Clean up and remove duplication