Implement contact updating.

Then this PR needs to depend on #3.