Fixed more bugs
Removed lots of debug statements