Compile fixes and polishing for clang.