Code refactored and fixed logic for adding telephones to the list