Feature/twig extensions

I may have messed this up by doing a pull request while working on top of what I'd done in #10, feel free to close if so.