Refactored the animation speed code and the sprites