Small improvements and cleanups