Minor style fixes and optimizations