Some fixes for build with Clang + cosmetic changes