Sorted out animations and refactored codebase