more minor cleanup and comments