moved viewMode switch from tim.js. TODO many small refactorings.
ng-animate is not yet working.