Some tweaks and API changes.