Minor formatting, added some tests.