Further restructuring and cleanup.