Finish up port of Fernando's tutorial.