This bit here could be split out into a separate route handling function, right? Then you could just call res.render() directly