Fix bunch of unused variable warnings