Refactor the icon animation