Fix warnings for unused variables. The other warnings are more nontrivial & require some light refactoring to fix, and will come in a followup PR.