Finished writing code.
Added comments to code as required in part 2.
Updated comments.
Added code for exercise 3.
Added latex file.