I am tired of how spaghetti-like the code is getting

trying to debug this mess.  I'm checking it in as it is so I can try to start over and re-implement without all the extra mess, one step at a time, trying to recreate the problem with the minimal code necessary.
Merge branch 'master' of github.com:Dunbaratu/LaserDist