Put type mapping into its own function because API generation will need this too
Merge pull request #2 from Marquis42/master

Put type mapping into its own function because API generation will need ...