Uncommented rotate functions in main.cc