Various changes and cleanups.