write tutorial (plus other doc fixes)