Some code cleanup from the Homework