Reformatted code, increased test coverage.