Improved addressbook logic