Merge pull request #2 from JoeDou/joeDev

code clean up
update rotational calculation