more cleanup and formatting