Finished all of the code for part 2.