Rewrite tutorial

Fixes #1