set up models and templates