documentRepair

Started writing documentRepair. Completely untested