Moved rot and rotg to new files, cleaned up a bit.