refactor views into templates/ and views/