Cleaning up accel function some more