Who thought I would use recursion in a real program. Finished the HTML functionality for the current state option.  Seems to work correctly on everything.