Added edit functionality for contacts and associated tests