Moved type creation to the module objects.
Self-review