Fix a memory leak and remove obsolete animation.