Removed commented out and legacy code