Homework 4 corrections/improvements