Cleanup and reorganization.