Finished solution checking, added tests

Ugh, trying to tie multiple untested functions together is just a pain,
even with a tiny project like this. It's way easier to bite the bullet
and write the tests, then you can connect each function with confidence.

Serves me right for getting cocky (well, and rushing) on a small
project.

"Slow is smooth, smooth is fast." (Sgt. Alvin York, disputed)