Fixed compiler warnings by removing unused variables.