minor cleanup and comments