Structure the API and write helper code.