more cleanup and testing