Moved accelerometer functions into distinct service