Removed debug code

Main code rev. 1833