Updated checks; fixed addClass, removeClass, and toggleClass.