More minor fixes and cleanups