Reorganize and cleanup.