DistanceSensor refactor
Main program refactor