Added tilt-movement toggle, worked on distance algorithm.