some more cleanup and editing