Tutorial: some restructuring