Fixes #9

Added some tests. Perhaps they are too much?