Setting up a Accelerometer class