Refactor next button pressed into updateAnimal and updateView functions.