More tutorial and code cleanup