Replaced acceleration sensor with a general derivative sensor
Removed additional getLength function and replaced it with flag
Fixed bug when init of range finder is called twice