Refactor character's animation