fixes a bunch of broken input files in various ways