Tests

This pull request adds tests. Yup, tests.