Fix a bunch of unused variable warnings