DRY the logic even more
Ok, that was too DRY.

Gotta read the compiler warnings more and just don't trust the manual
testing.
Remove unused variables