Add some tests

This is not a complete test suites yet, but I hope it's a good start.

Cheers Mattt