Exploring Legal Agreements: From Custody to Contracts