Update codebase to remove clang warnings (and a couple of legit errors