added template for views, minor changes