Stages one and two of the example code written.