In searching for efficient robot code, I stumbled across Behavioral Programming for Robots.
I had segmented the code to make it easy to incorporate new sensors and add additional behaviors, but the code is not (yet) aligned with the Behavioral Programming concept.