correct accel raw to gforce calculations; other refactorings.