more code cleanup and comments