Updated style. Added more tests.