allow constructor extension to use custom buildall generator
partial test and fix for type mapping+threads
move type map tie to its own module