fixing namespaces, imports, and instance names