Fixes for formatting and tests