Refactored application with namespaces