Code complete.

This is not perfect, but the test file itself was found to be bugged.