Did the optional tasks as well as fix the spacing of the code.