Added add/remove/has/toggleClass functions to graphical primitives