created model.tpl; removed code from js file