modularizing some toggle events in preparation for style refresh feature