major structure refactoring and ng-animate