Added checks for contacts

Contacts cannot add themselves, add contacts twice, and pending contacts are separated