Rework and cleanup.