Fix style issues and green test suite.