Added animations.json and some code refactoring