Minor improvements and cleanups