Added a bit more code/tests