Made some minor improvements to AbstractModel and added code to get id for newly inserted contact.