problem with store.js which prevents compilation of model.ts, otherwise fully ported to typescript