Fix phone bug in agreement contacts and more code cleanup.