Move all dust rendering to its own function

No more 'dust.render' and ugly error handlers inside the callbacks.