Move things around for gradient clipping