added support for defining and undefining a class with a namespace