Properly resolve namespaces; DRY