Cleanup and reorganization prior to adding some new functionality.