Refactor registry out into it own module and make global. Registry does not override previously defined registry.
Clean up imports.