From scratch again.

Thank you @sdevani for getting me on the right track with this. If I had more hours in the day, I could totally rewrite this with TDD.