Fix compareResults everywhere and factor it out.