Added code to "clean up" rotation angle variable