Fixed some bugs with running the tests, added some pretty print stuff

All the tests up until test 8 seem to work, but it breaks on test 9.
didn't test 10 and onwards.