Added face rotation and cleaned up some code.