Feature/tez

This merges my `feature/tez` branch with the changes introduced in #127 by @mandrews (and I like history merges, so sue me)