Fixes to typescript model & module