Fixed a Refactoring error and refactored some compass