Fix re-namespacing bug, add tests for the factory methods