Refactor die animation