Separate template and view