fix bug for empty or missing 'yes/no' in booleanClass.

add tests for toggle
add tests for switch
code cleanup related to yes/no