Some minor fixes and optimizations