Clearer logic, formatting + passed compilation