Fix some unused variables and lint warnings.