added delete contact and did a fair amount of refactoring