Consolidate address-book example code