Refactoring of the Animation into States