Code style fixes and consistency updates