Fixed bugs. Part 2 is working now.