Cleanup rotation & translation code