Fixed clang warnings and errors.