Code Refactor

- extracted constants out into separate Constants class
- broke up onSensorChanged() method into a couple helper methods to enhance readability