Cleanup of mapping classes