tidy up to support proper namespaces