Fixed clang errors, mainly type errors