added templates, fixed issues. changed models