Fixed bugs from parts 1 and 2 and began part 3