Part 3 completed

Code consolidated. Meets all criteria for part 3.