Reformat and make tests work