-code cleanup and comments