refactor to work with `express-view`

WIP