Minor general improvements and cleanups