Implement fixes proposed by clang-tidy