Refactor with Namespaces