Cleanup and fix for initial state race condition

- Changed detection of initial state of fieldset to use hasClass instead of more expensive attr & search. 
- Changed class toggle to chained remove/add class so that correct classes are added to fieldset on load.