Added a few more tests, as well as a 'functional' test.