Moved diminish require, cleaned up Py mode