Refactor into namespaces.