More cleanup and fixes.