more cleanup and consolidation