Second Commit

Proximity sensor now works the way I wanted it to.  Tweaked performance
in general.