Refactored to namespaces