Removing unused prevState variable.