Avoid KeyError when links or embedded are missing.
Improve API for adding links.