Add more tests, move to an in-file format

Moves tests to bottom of the file, as discussed. 

Added some more tests as well. However, a few of the algorithms are based around printing values, rather than returning them - they'll need to be altered in order to get a proper test.