Added unit tests. Also started refactoring and adding animations.