Fixed bug where clicks on radio vs checkbox button toggles were confused + more simplification and unit tests