basic templating added. in a relatively shitty, but non-broken state