Fix style guide violations and best practices