Replaced ad-hoc templating with tornado templating