Iteration 2 complete; needs a lot of refactoring