Refactor tutorial 2 to a consistent style