#38 more cleanup and testing