Added a unittest script. Probably, should have been doing TDD from the beginning. Ah well...