Cleanups, fixes, compatibility testing, documentation.