Removed old debug code. Cleaned up code.