Significant code cleanup

Significant Code cleanup.
Made some minor changes that appear to have helped the ROI for the curb
detector.