Refactored into namespaces