moved type creation from ModelBuilder to TypeBuilder