Add Unit Tests

I've seen no real unit tests. So i wrote some :-)