Switched to namespaces, fixed tests