Some improvements to contacts api.