Reformatted code.
Refactored tests.