Duplicate code was minimzed