Removed some debug messages and unused code.