Removed logging and some debug statements.