refactored rotate-controls directive