kevin anderson upgrade
support for ids & classes
removed excess dom access
added functions to namespace