Refactor into multiple namespaces