Allow overriding default formats and add tests