Homework 5 corrections

Made Problem 2 and Problem 3 far more concise and manageable. Problem 2
didn't require the use of node creation.