More fixes for style and tests