Add animation. Minor refactoring.