Many bug fixes and API changes.