Working on the "on on the fly" requirement.
Okay, I think I meet all the requirements.  One last test and then I am done.
Fixed the bug that the collapsation indicator wasn't updating after a collapse.
Eliminated redundant set