Improving model, configs, templates and update in jQuery