Added tests (that of course were already written, before the code, I just, erm, forgot, to add them to the repo originally)