cleaned up comments and debug code