Adding some TypeFactory tests and cleaning up type factory