The amount of duplicate code saddens me