Some cleanup and consolidation.