Tried to make sure test input and output was in the right place

This was a clean-up for various old versions of the code, and work to
match Kana's hacking to each version, providing both test input and
test output for each one.