Removed unused code
Removed debug code
Minor fixes

Space