Fix namespaces
Chunk of refactoring.