Tests are still embedded in code.

Also, I think loops might not work correctly. Need to refer back to this
at some point.