refactored compass to compass.js file
added rotateImage and showText functions