Misc changes and cleanup.