Match code style, improve test coverage, break out test cases.