Cleanup and API changes.