Tidy up tutorials

Fixes issue #522