various bug fixes relating to class names and namespaces