Small fixes and cleanups all around.