cleanup
extracted typemapper
extracted typemapper