Refactored assignment 1 solution.

While my original solution worked, it was more involved than necessary.
Refactored solution to match (more or less) what was shown as a solution at the
beginning of Lecture 3.
Merge pull request #2 from zanshin/assignment/one

Refactored assignment 1 solution.