diff --git a/.editorconfig b/.editorconfig
deleted file mode 100644
index 1923d41..0000000
--- a/.editorconfig
+++ /dev/null
@@ -1,8 +0,0 @@
-root = true
-
-[*]
-indent_style = space
-indent_size = 2
-charset = utf-8
-trim_trailing_whitespace = true
-insert_final_newline = true
diff --git a/.gitignore b/.gitignore
index cc4834b..0d848f8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
+.idea/
 .tmp/
 docs/
 coverage/
diff --git a/.yo-rc.json b/.yo-rc.json
deleted file mode 100644
index 3e329b3..0000000
--- a/.yo-rc.json
+++ /dev/null
@@ -1,21 +0,0 @@
-{
-  "generator-fountain-angular2": {
-    "version": "1.0.0-rc1",
-    "props": {
-      "framework": "angular2",
-      "modules": "webpack",
-      "argv": {
-        "remain": [],
-        "cooked": [],
-        "original": []
-      },
-      "ci": [],
-      "css": "scss",
-      "resolved": "/usr/local/lib/node_modules/generator-fountain-webapp/node_modules/generator-fountain-angular2/generators/app/index.js",
-      "js": "typescript",
-      "namespace": "fountain-angular2",
-      "sample": "hello",
-      "router": "router"
-    }
-  }
-}
\ No newline at end of file
diff --git a/README.md b/README.md
index a96eafb..18837b9 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,7 @@
 # XOS GUI
 
+This is the new XOS UI
+
 # Development
 
 This application can be executed on your system as long as you have `NodeJs` version 4 or higher.
@@ -12,4 +14,7 @@
 
 To load a different configration file you can use two environment variables:
 - `NODE_ENV`: to configure the app constants (eg: `dev`, `production`)
-- `BRAND`: to configure style constants (eg: `cord`, `opencloud`)
\ No newline at end of file
+- `BRAND`: to configure style constants (eg: `cord`, `opencloud`)
+
+
+
diff --git a/conf/gulp.conf.js b/conf/gulp.conf.js
index ab46d42..730290d 100644
--- a/conf/gulp.conf.js
+++ b/conf/gulp.conf.js
@@ -11,6 +11,8 @@
 const path = require('path');
 const gutil = require('gulp-util');
 
+exports.ngModule = 'app';
+
 /**
  *  The main paths of your project handle these with care
  */
diff --git a/conf/karma-auto.conf.js b/conf/karma-auto.conf.js
index b7e44ab..c0b9509 100644
--- a/conf/karma-auto.conf.js
+++ b/conf/karma-auto.conf.js
@@ -10,21 +10,28 @@
       outputDir: 'test-reports'
     },
     browsers: [
-      // 'Chrome',
       'PhantomJS'
     ],
     frameworks: [
-      'jasmine'
+      'jasmine',
+      'es6-shim'
     ],
     files: [
       'node_modules/es6-shim/es6-shim.js',
-      conf.path.src('index.spec.js')
+      conf.path.src('index.spec.js'),
+      conf.path.src('**/*.html')
     ],
     preprocessors: {
       [conf.path.src('index.spec.js')]: [
         'webpack'
+      ],
+      [conf.path.src('**/*.html')]: [
+        'ng-html2js'
       ]
     },
+    ngHtml2JsPreprocessor: {
+      stripPrefix: `${conf.paths.src}/`
+    },
     reporters: ['mocha', 'coverage'],
     coverageReporter: {
       type: 'html',
@@ -38,10 +45,12 @@
       require('karma-jasmine'),
       require('karma-junit-reporter'),
       require('karma-coverage'),
-      require('karma-chrome-launcher'),
       require('karma-phantomjs-launcher'),
-      require('karma-mocha-reporter'),
-      require('karma-webpack')
+      require('karma-phantomjs-shim'),
+      require('karma-ng-html2js-preprocessor'),
+      require('karma-webpack'),
+      require('karma-es6-shim'),
+      require('karma-mocha-reporter')
     ]
   };
 
diff --git a/conf/karma.conf.js b/conf/karma.conf.js
index 806a6f4..2db6132 100644
--- a/conf/karma.conf.js
+++ b/conf/karma.conf.js
@@ -13,17 +13,25 @@
       'PhantomJS'
     ],
     frameworks: [
-      'jasmine'
+      'jasmine',
+      'es6-shim'
     ],
     files: [
       'node_modules/es6-shim/es6-shim.js',
-      conf.path.src('index.spec.js')
+      conf.path.src('index.spec.js'),
+      conf.path.src('**/*.html')
     ],
     preprocessors: {
       [conf.path.src('index.spec.js')]: [
         'webpack'
+      ],
+      [conf.path.src('**/*.html')]: [
+        'ng-html2js'
       ]
     },
+    ngHtml2JsPreprocessor: {
+      stripPrefix: `${conf.paths.src}/`
+    },
     reporters: ['progress', 'coverage'],
     coverageReporter: {
       type: 'html',
@@ -38,7 +46,10 @@
       require('karma-junit-reporter'),
       require('karma-coverage'),
       require('karma-phantomjs-launcher'),
-      require('karma-webpack')
+      require('karma-phantomjs-shim'),
+      require('karma-ng-html2js-preprocessor'),
+      require('karma-webpack'),
+      require('karma-es6-shim')
     ]
   };
 
diff --git a/conf/webpack-dist.conf.js b/conf/webpack-dist.conf.js
index 3ba4a8a..33f0acb 100644
--- a/conf/webpack-dist.conf.js
+++ b/conf/webpack-dist.conf.js
@@ -4,6 +4,7 @@
 
 const HtmlWebpackPlugin = require('html-webpack-plugin');
 const ExtractTextPlugin = require('extract-text-webpack-plugin');
+const pkg = require('../package.json');
 const autoprefixer = require('autoprefixer');
 
 module.exports = {
@@ -26,6 +27,7 @@
         test: /\.ts$/,
         exclude: /node_modules/,
         loaders: [
+          'ng-annotate',
           'ts'
         ]
       },
@@ -43,13 +45,6 @@
     new HtmlWebpackPlugin({
       template: conf.path.src('index.html')
     }),
-    new webpack.ContextReplacementPlugin(
-      /angular(\\|\/)core(\\|\/)(esm(\\|\/)src|src)(\\|\/)linker/,
-      conf.paths.src
-    ),
-    new webpack.DefinePlugin({
-      'process.env.NODE_ENV': '"production"'
-    }),
     new webpack.optimize.UglifyJsPlugin({
       compress: {unused: true, dead_code: true, warnings: false} // eslint-disable-line camelcase
     }),
@@ -70,7 +65,10 @@
       '.ts'
     ]
   },
-  entry: `./${conf.path.src('index')}`,
+  entry: {
+    app: `./${conf.path.src('index')}`,
+    vendor: Object.keys(pkg.dependencies)
+  },
   ts: {
     configFileName: 'tsconfig.json'
   },
diff --git a/conf/webpack-test.conf.js b/conf/webpack-test.conf.js
index c39b1c4..c271708 100644
--- a/conf/webpack-test.conf.js
+++ b/conf/webpack-test.conf.js
@@ -1,5 +1,3 @@
-const webpack = require('webpack');
-const conf = require('./gulp.conf');
 module.exports = {
   module: {
     preLoaders: [
@@ -9,7 +7,6 @@
         loader: 'tslint'
       }
     ],
-
     loaders: [
       {
         test: /.json$/,
@@ -21,6 +18,7 @@
         test: /\.ts$/,
         exclude: /node_modules/,
         loaders: [
+          'ng-annotate',
           'ts'
         ]
       },
@@ -29,15 +27,19 @@
         loaders: [
           'html'
         ]
+      },
+      {
+        test: /\.(css|scss)$/,
+        loaders: [
+          'style',
+          'css',
+          'sass',
+          'postcss'
+        ]
       }
     ]
   },
-  plugins: [
-    new webpack.ContextReplacementPlugin(
-      /angular(\\|\/)core(\\|\/)(esm(\\|\/)src|src)(\\|\/)linker/,
-      conf.paths.src
-    )
-  ],
+  plugins: [],
   debug: true,
   devtool: 'source-map',
   resolve: {
diff --git a/conf/webpack.conf.js b/conf/webpack.conf.js
index f7830ce..56f2611 100644
--- a/conf/webpack.conf.js
+++ b/conf/webpack.conf.js
@@ -35,6 +35,7 @@
         test: /\.ts$/,
         exclude: /node_modules/,
         loaders: [
+          'ng-annotate',
           'ts'
         ]
       },
@@ -51,11 +52,7 @@
     new webpack.NoErrorsPlugin(),
     new HtmlWebpackPlugin({
       template: conf.path.src('index.html')
-    }),
-    new webpack.ContextReplacementPlugin(
-      /angular(\\|\/)core(\\|\/)(esm(\\|\/)src|src)(\\|\/)linker/,
-      conf.paths.src
-    )
+    })
   ],
   postcss: () => [autoprefixer],
   debug: true,
diff --git a/gulp_tasks/misc.js b/gulp_tasks/misc.js
index efd2cca..5197acb 100644
--- a/gulp_tasks/misc.js
+++ b/gulp_tasks/misc.js
@@ -3,7 +3,7 @@
 const gulp = require('gulp');
 const del = require('del');
 const filter = require('gulp-filter');
-const rename = require("gulp-rename");
+const rename = require('gulp-rename');
 
 const conf = require('../conf/gulp.conf');
 const cfgFolder = path.join(conf.paths.src, 'app/config');
@@ -14,17 +14,30 @@
 gulp.task('appConfig', appConfig);
 gulp.task('config', gulp.series('brand', 'appConfig'));
 
+console.log(process.env.NODE_ENV);
+
 function clean() {
   return del([conf.paths.dist, conf.paths.tmp]);
 }
 
+function other() {
+  const fileFilter = filter(file => file.stat.isFile());
+
+  return gulp.src([
+    path.join(conf.paths.src, '/**/*'),
+    path.join(`!${conf.paths.src}`, '/**/*.{scss,ts,html}')
+  ])
+    .pipe(fileFilter)
+    .pipe(gulp.dest(conf.paths.dist));
+}
+
 function appConfig() {
   const env = process.env.NODE_ENV || 'production';
   return gulp.src([
     path.join(conf.paths.appConfig, `app.config.${env}.ts`)
   ])
-  .pipe(rename('app.config.ts'))
-  .pipe(gulp.dest(cfgFolder));
+    .pipe(rename('app.config.ts'))
+    .pipe(gulp.dest(cfgFolder));
 }
 
 function styleConfig() {
@@ -32,8 +45,8 @@
   return gulp.src([
     path.join(conf.paths.appConfig, `style.config.${env}.ts`)
   ])
-  .pipe(rename('style.config.ts'))
-  .pipe(gulp.dest(cfgFolder));
+    .pipe(rename('style.config.ts'))
+    .pipe(gulp.dest(cfgFolder));
 }
 
 function other() {
diff --git a/package.json b/package.json
index ce762ff..9ccaf0d 100644
--- a/package.json
+++ b/package.json
@@ -1,82 +1,81 @@
 {
   "dependencies": {
-    "@angular/common": "2.2.4",
-    "@angular/compiler": "2.2.4",
-    "@angular/core": "2.2.4",
-    "@angular/forms": "2.2.4",
-    "@angular/http": "2.2.4",
-    "@angular/platform-browser": "2.2.4",
-    "@angular/platform-browser-dynamic": "2.2.4",
-    "@angular/router": "3.2.4",
-    "@types/jquery": "^2.0.34",
-    "@types/lodash": "^4.14.42",
-    "angular2-cookie": "^1.2.5",
-    "core-js": "^2.4.1",
-    "lodash": "^4.17.2",
-    "rxjs": "5.0.0-beta.12",
-    "socket.io-client": "^1.7.1",
-    "zone.js": "^0.6.21"
+    "angular": "^1.5.0",
+    "angular-cookies": "^1.6.0",
+    "angular-resource": "^1.6.0",
+    "angular-ui-router": "1.0.0-beta.1",
+    "socket.io-client": "^1.7.2"
   },
   "devDependencies": {
-    "@types/jquery": "^2.0.34",
+    "angular-mocks": "^1.5.0-beta.2",
     "autoprefixer": "^6.2.2",
     "babel-eslint": "^6.0.2",
     "babel-loader": "^6.2.0",
     "babel-plugin-istanbul": "^2.0.1",
     "browser-sync": "^2.9.11",
     "browser-sync-spa": "^1.0.3",
-    "codelyzer": "^0.0.25",
     "css-loader": "^0.23.1",
     "del": "^2.0.2",
     "es6-shim": "^0.35.0",
     "eslint": "^3.2.2",
+    "eslint-config-angular": "^0.5.0",
     "eslint-config-xo-space": "^0.12.0",
     "eslint-loader": "^1.3.0",
+    "eslint-plugin-angular": "^1.3.0",
     "eslint-plugin-babel": "^3.1.0",
     "extract-text-webpack-plugin": "^2.0.0-beta.3",
     "gulp": "gulpjs/gulp#4ed9a4a3275559c73a396eff7e1fde3824951ebb",
+    "gulp-angular-filesort": "^1.1.1",
+    "gulp-angular-templatecache": "^1.8.0",
     "gulp-filter": "^4.0.0",
+    "gulp-htmlmin": "^1.3.0",
     "gulp-hub": "frankwallis/gulp-hub#d461b9c700df9010d0a8694e4af1fb96d9f38bf4",
+    "gulp-insert": "^0.5.0",
+    "gulp-ng-annotate": "^1.1.0",
     "gulp-rename": "^1.2.2",
     "gulp-sass": "^2.1.1",
     "gulp-util": "^3.0.7",
     "html-loader": "^0.4.3",
     "html-webpack-plugin": "^2.9.0",
     "jasmine": "^2.4.1",
-    "jquery": "^3.1.1",
     "json-loader": "^0.5.4",
     "karma": "^1.3.0",
-    "karma-chrome-launcher": "^0.2.3",
+    "karma-angular-filesort": "^1.0.0",
     "karma-coverage": "^1.1.1",
+    "karma-es6-shim": "^1.0.0",
     "karma-jasmine": "^1.0.2",
     "karma-junit-reporter": "^1.1.0",
     "karma-mocha-reporter": "^2.2.1",
-    "karma-phantomjs-launcher": "^1.0.2",
+    "karma-ng-html2js-preprocessor": "^0.2.0",
+    "karma-phantomjs-launcher": "^1.0.0",
+    "karma-phantomjs-shim": "^1.1.2",
     "karma-webpack": "^1.7.0",
+    "ng-annotate-loader": "^0.0.10",
     "node-sass": "^3.4.2",
+    "phantomjs-prebuilt": "^2.1.6",
     "postcss-loader": "^0.8.0",
     "sass-loader": "^3.1.2",
     "style-loader": "^0.13.0",
     "ts-loader": "^0.8.2",
-    "tslint": "^3.2.1",
+    "tslint": "^3.15.1",
     "tslint-loader": "^2.1.0",
-    "typedoc": "^0.5.1",
-    "typescript": "2.0.8",
+    "typescript": "^2.0.2",
     "typings": "^1.0.4",
     "webpack": "2.1.0-beta.20"
   },
   "scripts": {
-    "start": "gulp serve",
     "build": "gulp",
-    "serve": "gulp serve",
+    "start": "gulp serve",
     "serve:dist": "gulp serve:dist",
     "test": "gulp test",
     "test:auto": "gulp test:auto",
     "config": "gulp config",
-    "lint": "tslint -c ./tslint.json ./src/**/*.ts",
-    "doc": "typedoc --out ./docs --module system --theme minimal ./src"
+    "lint": "tslint -c ./tslint.json 'src/**/*.ts'"
   },
   "eslintConfig": {
+    "globals": {
+      "expect": true
+    },
     "root": true,
     "env": {
       "browser": true,
diff --git a/spec/components/table.component.ts b/spec/components/table.component.ts
deleted file mode 100644
index b664b20..0000000
--- a/spec/components/table.component.ts
+++ /dev/null
@@ -1,81 +0,0 @@
-/// <reference path="../../typings/index.d.ts"/>
-
-import { Observable } from 'rxjs/Rx';
-import {BehaviorSubject} from 'rxjs';
-import { TestBed } from '@angular/core/testing';
-import { XosTableComponent } from './../../src/app/components/tables/table.component';
-import {IXosTableConfig} from '../../src/app/interfaces/xos-components/table.interface';
-import * as $ from 'jquery';
-
-describe('Component: XosTableComponent', () => {
-  let component: XosTableComponent;
-  let fixture;
-  let compiled;
-  let subject: BehaviorSubject<any>;
-  let observable: Observable<any>;
-
-  beforeEach(() => {
-
-    subject = new BehaviorSubject([]);
-    observable = subject.asObservable();
-
-    TestBed.configureTestingModule({
-      declarations: [XosTableComponent],
-      imports: []
-    });
-
-    fixture = TestBed.createComponent(XosTableComponent);
-    component = fixture.componentInstance;
-  });
-
-  it('should exist', () => {
-    expect(component).toBeDefined();
-  });
-
-  describe('when configured', () => {
-    beforeEach(() => {
-      component.config = {
-        columns: [
-          {
-            label: 'Col 1',
-            prop: 'foo'
-          },
-          {
-            label: 'Col 2',
-            prop: 'bar'
-          }
-        ]
-      };
-
-      subject.next([
-        {foo: 'foo1', bar: 'baz1'},
-        {foo: 'foo2', bar: 'baz2'}
-      ]);
-
-      component.data = observable;
-
-      // manually trigger data bindng
-      fixture.detectChanges();
-      compiled = fixture.nativeElement;
-    });
-
-    it('should print labels', () => {
-      const th1 = $(compiled).find('table tr:first-child th:first-child');
-      const th2 = $(compiled).find('table tr:first-child th:last-child');
-      expect(th1.text()).toBe('Col 1');
-      expect(th2.text()).toBe('Col 2');
-    });
-
-    it('should print content in rows', () => {
-      const td1_1 = $(compiled).find('table tr:nth-child(2) td:first-child');
-      const td1_2 = $(compiled).find('table tr:nth-child(2) td:last-child');
-      expect(td1_1.text().trim()).toBe('foo1');
-      expect(td1_2.text().trim()).toBe('baz1');
-
-      const td2_1 = $(compiled).find('table tr:nth-child(3) td:first-child');
-      const td2_2 = $(compiled).find('table tr:nth-child(3) td:last-child');
-      expect(td2_1.text().trim()).toBe('foo2');
-      expect(td2_2.text().trim()).toBe('baz2');
-    });
-  });
-});
diff --git a/spec/services/store.service.spec.ts b/spec/services/store.service.spec.ts
deleted file mode 100644
index a477817..0000000
--- a/spec/services/store.service.spec.ts
+++ /dev/null
@@ -1,89 +0,0 @@
-///<reference path="../../typings/globals/jasmine/index.d.ts"/>
-
-import {ObservableCollectionHandler} from '../../src/app/services/helpers/store.service';
-import {IWSEvent} from '../../src/app/interfaces/ws.interface';
-import {BehaviorSubject} from 'rxjs';
-
-describe('Service: Observable Collection Handler', () => {
-
-  let subject: BehaviorSubject<any>;
-  let observable;
-
-  beforeEach(() => {
-    subject = new BehaviorSubject([]);
-    observable = subject.asObservable();
-  });
-
-  it('Should have an update method', () => {
-    expect(ObservableCollectionHandler.update).toBeDefined();
-  });
-
-  it('should add an element to the observable', (done) => {
-    const event: IWSEvent = {
-      model: 'Test',
-      msg: {
-        pk: 1,
-        changed_fields: [],
-        object: {id: 1, foo: 'bar'}
-      }
-    };
-
-    ObservableCollectionHandler.update(event, subject);
-
-    subject.subscribe(
-      (collection: any[]) => {
-        expect(collection.length).toBe(1);
-        expect(collection[0].foo).toEqual('bar');
-        done();
-      }
-    );
-  });
-
-  describe('when the subject already have content', () => {
-    beforeEach(() => {
-      subject.next([{id: 1, foo: 'bar'}, {id: 2, foo: 'baz'}]);
-    });
-
-    it('should update an element', (done) => {
-      const event: IWSEvent = {
-        model: 'Test',
-        msg: {
-          pk: 1,
-          changed_fields: [],
-          object: {id: 1, foo: 'updated'}
-        }
-      };
-
-      ObservableCollectionHandler.update(event, subject);
-
-      subject.subscribe(
-        (collection: any[]) => {
-          expect(collection.length).toBe(2);
-          expect(collection[0].foo).toEqual('updated');
-          done();
-        }
-      );
-    });
-
-    it('should delete an element', (done) => {
-      const event: IWSEvent = {
-        model: 'Test',
-        msg: {
-          pk: 1,
-          changed_fields: ['deleted'],
-          object: {id: 1, foo: 'deleted'}
-        }
-      };
-
-      ObservableCollectionHandler.update(event, subject);
-
-      subject.subscribe(
-        (collection: any[]) => {
-          expect(collection.length).toBe(1);
-          expect(collection[0].foo).toEqual('baz');
-          done();
-        }
-      );
-    });
-  });
-});
diff --git a/src/.eslintrc.js b/src/.eslintrc.js
new file mode 100644
index 0000000..2a3da4b
--- /dev/null
+++ b/src/.eslintrc.js
@@ -0,0 +1,8 @@
+module.exports = {
+  extends: [
+    'angular'
+  ],
+  rules: {
+    'angular/no-service-method': 0
+  }
+}
diff --git a/src/app/components/logout/logout.component.ts b/src/app/components/logout/logout.component.ts
deleted file mode 100644
index 199cc10..0000000
--- a/src/app/components/logout/logout.component.ts
+++ /dev/null
@@ -1,33 +0,0 @@
-/// <reference path="../../../../typings/index.d.ts"/>
-import {Component, OnInit} from '@angular/core';
-import {Router} from '@angular/router';
-import {AuthService} from '../../services/rest/auth.service';
-
-@Component({
-  selector: 'xos-logout',
-  template: `
-    <button *ngIf="show" (click)="logout()">Logout</button>
-    `,
-  providers: [AuthService],
-})
-export class LogoutComponent implements OnInit {
-  public show: boolean = false;
-  constructor(private AuthService: AuthService, private router: Router) {
-  }
-
-  ngOnInit() {
-    if (this.AuthService.isAuthenticated()) {
-      this.show = true;
-    }
-  }
-
-  logout() {
-    this.AuthService.logout()
-      .subscribe(
-        () => {
-          this.router.navigate(['/login']);
-        }
-      );
-  }
-}
-
diff --git a/src/app/components/tables/table.component.html b/src/app/components/tables/table.component.html
deleted file mode 100644
index d945ae7..0000000
--- a/src/app/components/tables/table.component.html
+++ /dev/null
@@ -1,10 +0,0 @@
-<table>
-    <tr>
-        <th *ngFor="let col of _config.columns">{{col.label}}</th>
-    </tr>
-    <tr *ngFor="let item of _data">
-        <td *ngFor="let col of _config.columns">
-            {{item[col.prop]}}
-        </td>
-    </tr>
-</table>
\ No newline at end of file
diff --git a/src/app/components/tables/table.component.ts b/src/app/components/tables/table.component.ts
deleted file mode 100644
index 7e62235..0000000
--- a/src/app/components/tables/table.component.ts
+++ /dev/null
@@ -1,33 +0,0 @@
-import { Observable } from 'rxjs/Rx';
-/// <reference path="../../../../typings/index.d.ts"/>
-import { IXosTableConfig } from './../../interfaces/xos-components/table.interface';
-import {Component, OnInit, Input} from '@angular/core';
-
-@Component({
-  selector: 'xos-table',
-  template: require('./table.component.html'),
-})
-export class XosTableComponent implements OnInit {
-
-  public _config;
-  public _data;
-
-  @Input() config: IXosTableConfig;
-  @Input() data: Observable<any>;
-
-
-  ngOnInit() {
-
-    if (!this.config) {
-      throw new Error('[XosTable]: You must pass a configuration');
-    }
-
-    this._config = this.config;
-    this.data.subscribe(
-      (items: any[]) => {
-        this._data = items;
-      }
-    );
-  }
-}
-
diff --git a/src/app/config/.gitignore b/src/app/config/.gitignore
deleted file mode 100644
index c96a04f..0000000
--- a/src/app/config/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-*
-!.gitignore
\ No newline at end of file
diff --git a/src/app/config/app.config.ts b/src/app/config/app.config.ts
new file mode 100644
index 0000000..7b6fa12
--- /dev/null
+++ b/src/app/config/app.config.ts
@@ -0,0 +1,11 @@
+/// <reference path="../../../typings/index.d.ts"/>
+
+export interface IAppConfig {
+    apiEndpoint: string;
+    websocketClient: string;
+}
+
+export const AppConfig: IAppConfig = {
+    apiEndpoint: 'http://xos.dev:3000/api',
+    websocketClient: 'http://xos.dev:3000'
+};
diff --git a/src/app/config/style.config.ts b/src/app/config/style.config.ts
new file mode 100644
index 0000000..120725f
--- /dev/null
+++ b/src/app/config/style.config.ts
@@ -0,0 +1,11 @@
+/// <reference path="../../../typings/index.d.ts"/>
+
+export interface IStyleConfig {
+    projectName: string;
+    favicon: string;
+}
+
+export const StyleConfig: IStyleConfig = {
+    projectName: 'CORD',
+    favicon: 'cord-favicon.png'
+};
diff --git a/src/app/core/footer/footer.html b/src/app/core/footer/footer.html
new file mode 100644
index 0000000..8d14479
--- /dev/null
+++ b/src/app/core/footer/footer.html
@@ -0,0 +1,6 @@
+<footer class="footer">
+  Build with ♥ by the&nbsp;
+  <a href="https://github.com/opencord/xos/team">
+    {{vm.brand}} Team
+  </a>
+</footer>
diff --git a/src/app/core/footer/footer.spec.ts b/src/app/core/footer/footer.spec.ts
new file mode 100644
index 0000000..06c1044
--- /dev/null
+++ b/src/app/core/footer/footer.spec.ts
@@ -0,0 +1,22 @@
+/// <reference path="../../../../typings/index.d.ts" />
+
+import * as angular from 'angular';
+import 'angular-mocks';
+import {xosFooter} from './footer';
+import {StyleConfig} from '../../config/style.config';
+
+describe('footer component', () => {
+  beforeEach(() => {
+    angular
+      .module('xosFooter', ['app/core/footer/footer.html'])
+      .component('xosFooter', xosFooter);
+    angular.mock.module('xosFooter');
+  });
+
+  it('should render "XOS Team"', angular.mock.inject(($rootScope: ng.IRootScopeService, $compile: ng.ICompileService) => {
+    const element = $compile('<xos-footer></xos-footer>')($rootScope);
+    $rootScope.$digest();
+    const footer = element.find('a');
+    expect(footer.html().trim()).toEqual(`${StyleConfig.projectName} Team`);
+  }));
+});
diff --git a/src/app/core/footer/footer.ts b/src/app/core/footer/footer.ts
new file mode 100644
index 0000000..77a223b
--- /dev/null
+++ b/src/app/core/footer/footer.ts
@@ -0,0 +1,16 @@
+import {StyleConfig} from '../../config/style.config';
+
+class FooterCtrl {
+  public brand: string;
+
+  /** @ngInject */
+  constructor() {
+    this.brand = StyleConfig.projectName;
+  }
+}
+
+export const xosFooter: angular.IComponentOptions = {
+  template: require('./footer.html'),
+  controllerAs: 'vm',
+  controller: FooterCtrl
+};
diff --git a/src/app/core/header/header.html b/src/app/core/header/header.html
new file mode 100644
index 0000000..b327754
--- /dev/null
+++ b/src/app/core/header/header.html
@@ -0,0 +1,7 @@
+<header class="header">
+  <p class="header-title">
+    <a href="#/" target="_blank">
+      {{vm.title}}
+    </a>
+  </p>
+</header>
diff --git a/src/app/core/header/header.spec.ts b/src/app/core/header/header.spec.ts
new file mode 100644
index 0000000..7c00602
--- /dev/null
+++ b/src/app/core/header/header.spec.ts
@@ -0,0 +1,22 @@
+/// <reference path="../../../../typings/index.d.ts" />
+
+import * as angular from 'angular';
+import 'angular-mocks';
+import {xosHeader} from './header';
+import {StyleConfig} from '../../config/style.config';
+
+describe('header component', () => {
+  beforeEach(() => {
+    angular
+      .module('xosHeader', ['app/core/header/header.html'])
+      .component('xosHeader', xosHeader);
+    angular.mock.module('xosHeader');
+  });
+
+  it('should render the appropriate title', angular.mock.inject(($rootScope: ng.IRootScopeService, $compile: ng.ICompileService) => {
+    const element = $compile('<xos-header></xos-header>')($rootScope);
+    $rootScope.$digest();
+    const header = element.find('a');
+    expect(header.html().trim()).toEqual(StyleConfig.projectName);
+  }));
+});
diff --git a/src/app/core/header/header.ts b/src/app/core/header/header.ts
new file mode 100644
index 0000000..c2e4c41
--- /dev/null
+++ b/src/app/core/header/header.ts
@@ -0,0 +1,15 @@
+import {StyleConfig} from '../../config/style.config';
+
+class HeaderController {
+  public title: string;
+
+  constructor() {
+    this.title = StyleConfig.projectName;
+  }
+}
+
+export const xosHeader: angular.IComponentOptions = {
+  template: require('./header.html'),
+  controllerAs: 'vm',
+  controller: HeaderController
+};
diff --git a/src/app/core/index.ts b/src/app/core/index.ts
new file mode 100644
index 0000000..d0875b6
--- /dev/null
+++ b/src/app/core/index.ts
@@ -0,0 +1,15 @@
+import {xosHeader} from './header/header';
+import {xosFooter} from './footer/footer';
+import {xosNav} from './nav/nav';
+import routesConfig from './routes';
+import {xosLogin} from './login/login';
+
+export const xosCore = 'xosCore';
+
+angular
+  .module('xosCore', ['ui.router'])
+  .config(routesConfig)
+  .component('xosHeader', xosHeader)
+  .component('xosFooter', xosFooter)
+  .component('xosNav', xosNav)
+  .component('xosLogin', xosLogin);
diff --git a/src/app/core/login/login.html b/src/app/core/login/login.html
new file mode 100644
index 0000000..f4a0724
--- /dev/null
+++ b/src/app/core/login/login.html
@@ -0,0 +1,5 @@
+<form name="login">
+  <input type="text" name="username" ng-model="username" required>
+  <input type="text" name="password" ng-model="password" required>
+  <button type="button" ng-click="vm.login(username, password)">Login</button>
+</form>
diff --git a/src/app/core/login/login.ts b/src/app/core/login/login.ts
new file mode 100644
index 0000000..af46619
--- /dev/null
+++ b/src/app/core/login/login.ts
@@ -0,0 +1,30 @@
+import {AuthService} from '../../rest/auth.rest';
+
+class LoginCtrl {
+  static $inject = ['AuthService', '$state'];
+
+  /** @ngInject */
+  constructor(
+    private authService: AuthService,
+    private $state: angular.ui.IStateService
+  ) {
+  }
+
+  public login(username: string, password: string) {
+    this.authService.login({
+      username: username,
+      password: password
+    })
+      .then(res => {
+        console.log(res);
+        this.$state.go('app');
+      })
+      .catch(e => console.error);
+  }
+}
+
+export const xosLogin: angular.IComponentOptions = {
+  template: require('./login.html'),
+  controllerAs: 'vm',
+  controller: LoginCtrl
+};
diff --git a/src/app/core/nav/nav.html b/src/app/core/nav/nav.html
new file mode 100644
index 0000000..6256369
--- /dev/null
+++ b/src/app/core/nav/nav.html
@@ -0,0 +1,7 @@
+<div class="nav">
+  <ul>
+    <li ng-repeat="route in vm.routes" ui-sref-active="active">
+      <a ui-sref="{{route.state}}">{{route.label}}</a>
+    </li>
+  </ul>
+</div>
diff --git a/src/app/core/nav/nav.scss b/src/app/core/nav/nav.scss
new file mode 100644
index 0000000..8591c15
--- /dev/null
+++ b/src/app/core/nav/nav.scss
@@ -0,0 +1,37 @@
+xos-nav {
+  display: flex;
+  flex: 1;
+  flex-direction: column;
+  flex-basis: 10%;
+  background: darken(grey, 10);
+
+  ul {
+    list-style: none;
+    padding: 0;
+    margin: 0;
+    background: grey;
+
+    > li {
+      display: flex;
+      flex-direction: column;
+      padding: 10px 20px;
+      border-bottom: 1px solid darken(grey, 20);
+
+      &.active {
+        background: darken(grey, 10);
+
+        > a {
+          color: #5aadbb;
+        }
+      }
+
+      &:hover {
+        background: darken(grey, 10);
+      }
+
+      > a {
+        cursor: pointer;
+      }
+    }
+  }
+}
diff --git a/src/app/core/nav/nav.ts b/src/app/core/nav/nav.ts
new file mode 100644
index 0000000..d90df10
--- /dev/null
+++ b/src/app/core/nav/nav.ts
@@ -0,0 +1,37 @@
+import './nav.scss';
+
+interface INavItem {
+  label: string;
+  state: string;
+}
+
+class NavCtrl {
+  public routes: INavItem[];
+
+  constructor() {
+    this.routes = [
+      {
+        label: 'Home',
+        state: 'xos.dashboard'
+      },
+      {
+        label: 'Instances',
+        state: 'xos.instances'
+      },
+      {
+        label: 'Slices',
+        state: 'xos.slices'
+      },
+      {
+        label: 'Nodes',
+        state: 'xos.nodes'
+      }
+    ];
+  }
+}
+
+export const xosNav: angular.IComponentOptions = {
+  template: require('./nav.html'),
+  controllerAs: 'vm',
+  controller: NavCtrl
+};
diff --git a/src/app/core/routes.ts b/src/app/core/routes.ts
new file mode 100644
index 0000000..5f37713
--- /dev/null
+++ b/src/app/core/routes.ts
@@ -0,0 +1,10 @@
+export default routesConfig;
+
+/** @ngInject */
+function routesConfig($stateProvider: angular.ui.IStateProvider, $urlRouterProvider: angular.ui.IUrlRouterProvider, $locationProvider: angular.ILocationProvider) {
+  $stateProvider
+    .state('login', {
+      url: '/login',
+      component: 'xosLogin'
+    });
+}
diff --git a/src/app/directives/protected.directive.ts b/src/app/directives/protected.directive.ts
deleted file mode 100644
index 8eac4fd..0000000
--- a/src/app/directives/protected.directive.ts
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- * Created by teone on 12/5/16.
- */
-import {Directive, OnDestroy} from '@angular/core';
-import {AuthService} from '../services/rest/auth.service';
-import {Router} from '@angular/router';
-
-@Directive({
-  selector: '[xosProtected]',
-  providers: [AuthService]
-})
-export class ProtectedDirective implements OnDestroy {
-
-  constructor(private authService: AuthService, private router: Router) {
-    if (!this.authService.isAuthenticated()) {
-      this.router.navigate(['/login']);
-    }
-    // TODO listen for logout
-  }
-
-  ngOnDestroy() {
-    // if (this.sub != null) {
-    //   this.sub.unsubscribe();
-    // }
-  }
-}
diff --git a/src/app/hello.html b/src/app/hello.html
deleted file mode 100644
index 3ed1088..0000000
--- a/src/app/hello.html
+++ /dev/null
@@ -1,12 +0,0 @@
-<div xos-protected></div>
-
-<h1>{{ hello }}</h1>
-
-<xos-logout></xos-logout>
-
-<xos-table [config]="cfg" [data]="data"></xos-table>
-
-<div *ngFor="let slice of slices">
-  <b>{{slice.name}}</b>
-  <i>{{slice.backend_status}}</i>
-</div>
diff --git a/src/app/hello.ts b/src/app/hello.ts
deleted file mode 100644
index cd90d22..0000000
--- a/src/app/hello.ts
+++ /dev/null
@@ -1,45 +0,0 @@
-import { Observable } from 'rxjs/Rx';
-import { IXosTableConfig } from './interfaces/xos-components/table.interface';
-/// <reference path="../../typings/index.d.ts"/>
-import {Component, OnInit} from '@angular/core';
-import {StyleConfig} from './config/style.config';
-import {ISlice} from './interfaces/models.interface';
-import {SliceStore} from './services/stores/slice.store';
-
-@Component({
-  selector: 'xos-app',
-  template: require('./hello.html'),
-  providers: [SliceStore],
-})
-export class HelloComponent implements OnInit {
-
-  // declare class properties
-  public hello: string;
-  public slices: ISlice[];
-  public data: Observable<any>;
-
-  public cfg: IXosTableConfig = {
-    columns: [
-      {
-        label: 'Name',
-        prop: 'name'
-      },
-      {
-        label: 'Default Isolation',
-        prop: 'default_isolation'
-      }
-    ]
-  };
-
-  constructor(
-    private sliceStore: SliceStore
-  ) {
-    this.hello = `Hello ${StyleConfig.projectName}!`;
-    this.slices = [];
-  }
-
-  ngOnInit() {
-    console.log('on init');
-    this.data = this.sliceStore.query();
-  }
-}
diff --git a/src/app/index.ts b/src/app/index.ts
deleted file mode 100644
index 2648153..0000000
--- a/src/app/index.ts
+++ /dev/null
@@ -1,50 +0,0 @@
-import { XosTableComponent } from './components/tables/table.component';
-import {NgModule} from '@angular/core';
-import {BrowserModule} from '@angular/platform-browser';
-import {HttpModule}    from '@angular/http';
-import {FormsModule}   from '@angular/forms';
-import {CookieService} from 'angular2-cookie/services/cookies.service';
-
-import {routing, RootComponent} from './routes';
-
-// registering components
-import {HelloComponent} from './hello';
-import {LoginComponent} from './views/login/login.component';
-import {LogoutComponent} from './components/logout/logout.component';
-
-// registering directives
-import {ProtectedDirective} from './directives/protected.directive';
-
-// registering services
-import {AuthService} from './services/rest/auth.service';
-import {XosHttp} from './services/rest/xoshttp.service';
-import {InstanceService} from './services/rest/instance.service';
-import {GlobalEvent} from './services/websockets/websocket.global';
-import {SliceService} from './services/rest/slices.service';
-
-@NgModule({
-  imports: [
-    BrowserModule,
-    FormsModule,
-    routing,
-    HttpModule
-  ],
-  declarations: [
-    RootComponent,
-    HelloComponent,
-    LoginComponent,
-    LogoutComponent,
-    XosTableComponent,
-    ProtectedDirective
-  ],
-  providers: [
-    CookieService,
-    AuthService,
-    XosHttp,
-    InstanceService,
-    SliceService,
-    GlobalEvent
-  ],
-  bootstrap: [RootComponent]
-})
-export class AppModule {}
diff --git a/src/app/interfaces/auth.interface.ts b/src/app/interfaces/auth.interface.ts
deleted file mode 100644
index 1742fb7..0000000
--- a/src/app/interfaces/auth.interface.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-export interface IAuthRequest {
-  username: string;
-  password: string;
-}
-
-export interface IAuthResponse {
-  xossessionid: string;
-  xoscsrftoken: string;
-  user: string;
-}
diff --git a/src/app/interfaces/models.interface.ts b/src/app/interfaces/models.interface.ts
deleted file mode 100644
index 77c0534..0000000
--- a/src/app/interfaces/models.interface.ts
+++ /dev/null
@@ -1,18 +0,0 @@
-export interface IInstance {
-  id: number;
-  name: string;
-  backend_status: string;
-  created: string;
-}
-
-/**
- * @whatItDoes Describes the slice model.
- * @stable
- */
-export interface ISlice {
-  id: number;
-  name: string;
-  backend_status: string;
-  created: string;
-}
-
diff --git a/src/app/interfaces/ws.interface.ts b/src/app/interfaces/ws.interface.ts
deleted file mode 100644
index cadf44c..0000000
--- a/src/app/interfaces/ws.interface.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-export interface IWSEvent {
- model: string;
- msg: {
-   changed_fields: string[],
-   object?: any,
-   pk?: number
- };
-}
diff --git a/src/app/interfaces/xos-components/table.interface.ts b/src/app/interfaces/xos-components/table.interface.ts
deleted file mode 100644
index 657c89d..0000000
--- a/src/app/interfaces/xos-components/table.interface.ts
+++ /dev/null
@@ -1,18 +0,0 @@
-export interface IXosTableConfigColumn {
-    label: string;
-    prop: string;
-}
-
-export interface IXosTableConfigActionCallback {
-    (item: string): void;
-}
-
-export interface IXosTableConfigAction {
-    label: string;
-    cb: IXosTableConfigActionCallback
-}
-
-export interface IXosTableConfig {
-    columns: IXosTableConfigColumn[];
-    actions?: IXosTableConfigAction[];
-}
\ No newline at end of file
diff --git a/src/app/main.html b/src/app/main.html
new file mode 100644
index 0000000..21ebfc2
--- /dev/null
+++ b/src/app/main.html
@@ -0,0 +1,10 @@
+<div class="main-container">
+  <xos-header></xos-header>
+  <main class="main">
+    <xos-nav></xos-nav>
+    <div class="content">
+      <div ui-view></div>
+    </div>
+  </main>
+  <xos-footer></xos-footer>
+</div>
diff --git a/src/app/main.spec.ts b/src/app/main.spec.ts
new file mode 100644
index 0000000..2409163
--- /dev/null
+++ b/src/app/main.spec.ts
@@ -0,0 +1,21 @@
+/// <reference path="../../typings/index.d.ts" />
+
+import * as angular from 'angular';
+import 'angular-mocks';
+import {main} from './main';
+
+describe('main component', () => {
+  beforeEach(() => {
+    angular
+      .module('app', ['app/main.html'])
+      .component('app', main);
+    angular.mock.module('app');
+  });
+
+  it('should render the header, title, techs and footer', angular.mock.inject(($rootScope: ng.IRootScopeService, $compile: ng.ICompileService) => {
+    const element = $compile('<app></app>')($rootScope);
+    $rootScope.$digest();
+    expect(element.find('xos-header').length).toEqual(1);
+    expect(element.find('xos-footer').length).toEqual(1);
+  }));
+});
diff --git a/src/app/main.ts b/src/app/main.ts
new file mode 100644
index 0000000..11dd35a
--- /dev/null
+++ b/src/app/main.ts
@@ -0,0 +1,3 @@
+export const main: angular.IComponentOptions = {
+  template: require('./main.html')
+};
diff --git a/src/app/rest/auth.rest.ts b/src/app/rest/auth.rest.ts
new file mode 100644
index 0000000..c72b51e
--- /dev/null
+++ b/src/app/rest/auth.rest.ts
@@ -0,0 +1,41 @@
+import {AppConfig} from '../config/app.config';
+import IHttpPromiseCallbackArg = angular.IHttpPromiseCallbackArg;
+export interface IAuthRequestData {
+  username: string;
+  password: string;
+}
+
+export interface IAuthResponseData extends IHttpPromiseCallbackArg<any> {
+  data: {
+    user: string;
+    xoscsrftoken: string;
+    xossessionid: string;
+  };
+}
+export class AuthService {
+
+
+  /** @ngInject */
+  constructor(
+    private $http: angular.IHttpService,
+    private $q: angular.IQService,
+    private $cookies: angular.cookies.ICookiesService
+  ) {
+  }
+
+  public login(data: IAuthRequestData): Promise<any> {
+    const d = this.$q.defer();
+    this.$http.post(`${AppConfig.apiEndpoint}/utility/login/`, data)
+      .then((res: IAuthResponseData) => {
+        this.$cookies.put('xoscsrftoken', res.data.xoscsrftoken);
+        this.$cookies.put('xossessionid', res.data.xossessionid);
+        this.$cookies.put('xosuser', res.data.user);
+        res.data.user = JSON.parse(res.data.user);
+        d.resolve(res.data);
+      })
+      .catch(e => {
+        d.reject(e);
+      });
+    return d.promise;
+  }
+}
diff --git a/src/app/rest/core.rest.ts b/src/app/rest/core.rest.ts
new file mode 100644
index 0000000..aace3aa
--- /dev/null
+++ b/src/app/rest/core.rest.ts
@@ -0,0 +1,18 @@
+import {AppConfig} from '../config/app.config';
+export class CoreRest {
+
+  /** @ngInject */
+  constructor(
+    private $http: angular.IHttpService,
+    private $q: angular.IQService
+  ) {
+  }
+
+  public query(): Promise<any> {
+    const d = this.$q.defer();
+    this.$http.get(`${AppConfig.apiEndpoint}/core/`)
+      .then(res => d.resolve(res.data))
+      .catch(d.reject);
+    return d.promise;
+  }
+}
diff --git a/src/app/rest/index.ts b/src/app/rest/index.ts
new file mode 100644
index 0000000..d28084b
--- /dev/null
+++ b/src/app/rest/index.ts
@@ -0,0 +1,11 @@
+import {CoreRest} from './core.rest';
+import {SlicesRest} from './slices.rest';
+import {AuthService} from './auth.rest';
+
+export const xosRest = 'xosRest';
+
+angular
+  .module('xosRest', ['ngCookies'])
+  .service('CoreRest', CoreRest)
+  .service('SlicesRest', SlicesRest)
+  .service('AuthService', AuthService);
diff --git a/src/app/rest/slices.rest.ts b/src/app/rest/slices.rest.ts
new file mode 100644
index 0000000..0d1d8a1
--- /dev/null
+++ b/src/app/rest/slices.rest.ts
@@ -0,0 +1,20 @@
+import {AppConfig} from '../config/app.config';
+
+export interface IXosResourceService {
+  getResource(): ng.resource.IResourceClass<any>;
+}
+
+export class SlicesRest implements IXosResourceService{
+  static $inject = ['$resource'];
+
+  /** @ngInject */
+  constructor(
+    private $resource: ng.resource.IResourceService
+  ) {
+
+  }
+
+  public getResource(): ng.resource.IResourceClass<ng.resource.IResource<any>> {
+    return this.$resource(`${AppConfig.apiEndpoint}/core/slices/`);
+  }
+}
diff --git a/src/app/routes.ts b/src/app/routes.ts
deleted file mode 100644
index 53fa2cc..0000000
--- a/src/app/routes.ts
+++ /dev/null
@@ -1,27 +0,0 @@
-/// <reference path="../../typings/index.d.ts"/>
-
-import {Component} from '@angular/core';
-import {RouterModule, Routes} from '@angular/router';
-import {HelloComponent} from './hello';
-import {LoginComponent} from './views/login/login.component';
-
-@Component({
-  selector: 'xos-root',
-  template: `
-    <router-outlet></router-outlet>
-  `
-})
-export class RootComponent {}
-
-export const routes: Routes = [
-  {
-    path: '',
-    component: HelloComponent
-  },
-  {
-    path: 'login',
-    component: LoginComponent
-  }
-];
-
-export const routing = RouterModule.forRoot(routes);
diff --git a/src/app/services/helpers/store.service.ts b/src/app/services/helpers/store.service.ts
deleted file mode 100644
index 80e8e05..0000000
--- a/src/app/services/helpers/store.service.ts
+++ /dev/null
@@ -1,40 +0,0 @@
-import {Injectable} from '@angular/core';
-import {IWSEvent} from '../../interfaces/ws.interface';
-import {BehaviorSubject} from 'rxjs';
-import * as _ from 'lodash';
-
-/**
- * @whatItDoes Update a BehaviorSubject after receiving an event from an Observable
- * @stable
- */
-
-@Injectable()
-export class ObservableCollectionHandler {
-
-    static update(event: IWSEvent, subject: BehaviorSubject<any>): BehaviorSubject<any> {
-      const collection: any[] = subject.value;
-
-      const index: number = _.findIndex(collection, (i) => {
-        return i.id === event.msg.object.id;
-      });
-      const exist: boolean = index > -1;
-      const isDeleted: boolean = _.includes(event.msg.changed_fields, 'deleted');
-
-      // remove
-      if (exist && isDeleted) {
-        _.remove(collection, {id: event.msg.object.id});
-      }
-      // Replace item at index using native splice
-      else if (exist && !isDeleted) {
-        collection.splice(index, 1, event.msg.object);
-      }
-      // if the element is not deleted add it
-      else if (!exist && !isDeleted) {
-        collection.push(event.msg.object);
-      }
-
-      subject.next(collection);
-
-      return subject;
-    }
-}
diff --git a/src/app/services/rest/auth.service.ts b/src/app/services/rest/auth.service.ts
deleted file mode 100644
index 978825f..0000000
--- a/src/app/services/rest/auth.service.ts
+++ /dev/null
@@ -1,72 +0,0 @@
-/// <reference path="../../../../typings/index.d.ts"/>
-
-// Imports
-import {AppConfig} from '../../config/app.config';
-import {Injectable} from '@angular/core';
-import {Http, Response, Headers} from '@angular/http';
-import {Observable} from 'rxjs/Rx';
-import {IAuthRequest, IAuthResponse} from '../../interfaces/auth.interface';
-import {CookieService} from 'angular2-cookie/core';
-
-// Import RxJs required methods
-import 'rxjs/add/operator/map';
-import 'rxjs/add/operator/catch';
-
-@Injectable()
-export class AuthService {
-  private xosToken: string;
-  private xosSessionId: string;
-  // resolve HTTP using the constructor
-  constructor (private http: Http, private cookieService: CookieService) {
-  }
-
-  // check if the user is authenticated
-  isAuthenticated(): string {
-    this.xosToken = this.cookieService.get('xoscsrftoken');
-    this.xosSessionId = this.cookieService.get('xossessionid');
-    return this.xosToken && this.xosSessionId;
-  }
-
-  // get auth info to authenticate API
-  getUserHeaders(): Headers {
-    const headers = new Headers();
-    headers.append('x-csrftoken', this.cookieService.get('xoscsrftoken'));
-    headers.append('x-sessionid', this.cookieService.get('xossessionid'));
-    return headers;
-  }
-
-  // log the user in
-  login(auth: IAuthRequest): Observable<IAuthResponse> {
-    return this.http.post(`${AppConfig.apiEndpoint}/utility/login/`, auth)
-      .map((res: Response) => res.json())
-      .map((auth: IAuthResponse) => {
-        this.storeAuth(auth);
-        auth.user = JSON.parse(auth.user);
-        return auth;
-      })
-      .catch((error: any) => Observable.throw(error.json().error || 'Server error'));
-  }
-
-  // logout the user
-  logout(): Observable<any> {
-    return this.http.post(`${AppConfig.apiEndpoint}/utility/logout/`, {xossessionid: this.xosSessionId})
-      .map((res: Response) => {
-        this.removeAuth();
-        return res.text();
-      })
-      .catch((error: any) => Observable.throw(error.json().error || 'Server error'));
-  }
-
-  // save cookies
-  private storeAuth(auth: IAuthResponse): void {
-    this.cookieService.put('xoscsrftoken', auth.xoscsrftoken);
-    this.cookieService.put('xossessionid', auth.xossessionid);
-  }
-
-  // remove cookies
-  private removeAuth(): void {
-    this.cookieService.remove('xoscsrftoken');
-    this.cookieService.remove('xossessionid');
-  }
-}
-
diff --git a/src/app/services/rest/core.service.ts b/src/app/services/rest/core.service.ts
deleted file mode 100644
index a283024..0000000
--- a/src/app/services/rest/core.service.ts
+++ /dev/null
@@ -1,35 +0,0 @@
-/// <reference path="../../../../typings/index.d.ts"/>
-
-// Imports
-import {AppConfig} from '../../config/app.config';
-import {Injectable}     from '@angular/core';
-import {Response} from '@angular/http';
-import {Observable} from 'rxjs/Rx';
-import {XosHttp} from './xoshttp.service';
-
-// Import RxJs required methods
-import 'rxjs/add/operator/map';
-import 'rxjs/add/operator/catch';
-
-@Injectable()
-export class CoreService {
-  // private instance variable to hold base url
-  private baseUrl = AppConfig.apiEndpoint;
-
-  // Resolve HTTP using the constructor
-  constructor (private http: XosHttp) {}
-
-  // Fetch all existing comments
-  getCoreEndpoints(): Observable<any[]> {
-
-    const search = 'some=param';
-
-    // ...using get request
-    return this.http.get(`${this.baseUrl}/core/`, {search})
-    // ...and calling .json() on the response to return data
-      .map((res: Response) => res.json())
-      // ...errors if any
-      .catch((error: any) => Observable.throw(error.json().error || 'Server error'));
-
-  }
-}
diff --git a/src/app/services/rest/instance.service.ts b/src/app/services/rest/instance.service.ts
deleted file mode 100644
index 899b484..0000000
--- a/src/app/services/rest/instance.service.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-/// <reference path="../../../../typings/index.d.ts"/>
-
-// Imports
-import {AppConfig} from '../../config/app.config';
-import {AuthService} from './auth.service';
-import {Injectable}     from '@angular/core';
-import {Response} from '@angular/http';
-import {XosHttp} from './xoshttp.service';
-import {Observable} from 'rxjs/Rx';
-
-// Import RxJs required methods
-import 'rxjs/add/operator/map';
-import 'rxjs/add/operator/catch';
-
-@Injectable()
-export class InstanceService {
-  private baseUrl = AppConfig.apiEndpoint;
-  constructor (private http: XosHttp, private authService: AuthService) {}
-  // Fetch all existing instances
-  query() : Observable<any[]> {
-    return this.http.get(`${this.baseUrl}/core/instances/`)
-      .map((res: Response) => res.json())
-      .catch((error: any) => Observable.throw(error.response.json().error || 'Server error'));
-  }
-}
diff --git a/src/app/services/rest/slices.service.ts b/src/app/services/rest/slices.service.ts
deleted file mode 100644
index 2b71d7a..0000000
--- a/src/app/services/rest/slices.service.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/// <reference path="../../../../typings/index.d.ts"/>
-
-// Imports
-import {AppConfig} from '../../config/app.config';
-import { Injectable }     from '@angular/core';
-import { Response} from '@angular/http';
-import {XosHttp} from './xoshttp.service';
-import {Observable} from 'rxjs/Rx';
-
-// Import RxJs required methods
-import 'rxjs/add/operator/map';
-import 'rxjs/add/operator/catch';
-
-@Injectable()
-export class SliceService {
-  private baseUrl = AppConfig.apiEndpoint;
-  constructor (private http: XosHttp) {}
-  // Fetch all existing instances
-  query() : Observable<any[]> {
-    return this.http.get(`${this.baseUrl}/core/slices/`)
-      .map((res: Response) => res.json())
-      .catch((error: any) => Observable.throw(error.response.json().error || 'Server error'));
-  }
-}
diff --git a/src/app/services/rest/xoshttp.service.ts b/src/app/services/rest/xoshttp.service.ts
deleted file mode 100644
index a300ee3..0000000
--- a/src/app/services/rest/xoshttp.service.ts
+++ /dev/null
@@ -1,55 +0,0 @@
-import {Http, RequestOptionsArgs, Response, URLSearchParams} from '@angular/http';
-import {Injectable} from '@angular/core';
-import {Observable} from 'rxjs';
-import {AuthService} from './auth.service';
-/**
- * Created by teone on 12/6/16.
- */
-@Injectable()
-export class XosHttp {
-  constructor(
-    private http: Http,
-    private authService: AuthService
-  ) {
-  }
-
-  // TODO intercept non authenticated calls and send to login (remove cookies)
-  // TODO add POST, PUT, DELETE declaration
-  get(url: string, options?: RequestOptionsArgs): Observable<Response> {
-
-    options = this.checkOptions(options);
-    options = this.getHeaders(options);
-    options = this.getParams(options);
-
-    return this.http.get(url, options);
-  }
-
-  private checkOptions(options?: RequestOptionsArgs): RequestOptionsArgs {
-    // if options are not there, create them
-    if (!options) {
-      options = {};
-    }
-    return options;
-  }
-
-  private getHeaders(options: RequestOptionsArgs): RequestOptionsArgs {
-    // add auth headers
-    options.headers = this.authService.getUserHeaders();
-    return options;
-  }
-
-  private getParams(options: RequestOptionsArgs): RequestOptionsArgs {
-    // add the no_hyperlinks param
-    if (!options.search) {
-      options.search = new URLSearchParams();
-    }
-
-    if (options.search instanceof URLSearchParams) {
-      options.search.set('no_hyperlinks', '1');
-    }
-    else if (typeof options.search === 'string') {
-      options.search += '&no_hyperlinks=1';
-    }
-    return options;
-  }
-}
diff --git a/src/app/services/stores/instance.store.ts b/src/app/services/stores/instance.store.ts
deleted file mode 100644
index 9a07095..0000000
--- a/src/app/services/stores/instance.store.ts
+++ /dev/null
@@ -1,39 +0,0 @@
-/// <reference path="../../../../typings/index.d.ts"/>
-
-import {Injectable} from '@angular/core';
-import {BehaviorSubject} from 'rxjs/Rx';
-import {IInstance} from '../../interfaces/models.interface';
-import {InstanceService} from '../rest/instance.service';
-import {IWSEvent} from '../../interfaces/ws.interface';
-import {GlobalEvent} from '../websockets/websocket.global';
-import {ObservableCollectionHandler} from '../helpers/store.service';
-
-@Injectable()
-export class InstanceStore {
-  private _instances: BehaviorSubject<IInstance[]> = new BehaviorSubject([]);
-  constructor(private instanceService: InstanceService, private globalEvent: GlobalEvent) {
-    this.loadInitialData();
-    this.globalEvent.list()
-      .filter((e: IWSEvent) => e.model === 'Instance')
-      .subscribe(
-        (event: IWSEvent) => {
-          ObservableCollectionHandler.update(event, this._instances);
-        }
-      );
-  }
-
-  loadInitialData() {
-    this.instanceService.query()
-      .subscribe(
-        res => {
-          this._instances.next(res);
-        },
-        err => console.log('Error retrieving Instances', err)
-      );
-  }
-
-  query() {
-    return this._instances.asObservable();
-  }
-
-}
diff --git a/src/app/services/stores/slice.store.ts b/src/app/services/stores/slice.store.ts
deleted file mode 100644
index aeab9f3..0000000
--- a/src/app/services/stores/slice.store.ts
+++ /dev/null
@@ -1,39 +0,0 @@
-/// <reference path="../../../../typings/index.d.ts"/>
-
-import {Injectable} from '@angular/core';
-import {BehaviorSubject} from 'rxjs/Rx';
-import {ISlice} from '../../interfaces/models.interface';
-import {IWSEvent} from '../../interfaces/ws.interface';
-import {GlobalEvent} from '../websockets/websocket.global';
-import {SliceService} from '../rest/slices.service';
-import {ObservableCollectionHandler} from '../helpers/store.service';
-
-@Injectable()
-export class SliceStore {
-  private _slices: BehaviorSubject<ISlice[]> = new BehaviorSubject([]);
-  constructor(private sliceService: SliceService, private globalEvent: GlobalEvent) {
-    this.loadInitialData();
-    this.globalEvent.list()
-      .filter((e: IWSEvent) => e.model === 'Slice')
-      .subscribe(
-        (event: IWSEvent) => {
-          ObservableCollectionHandler.update(event, this._slices);
-        }
-      );
-  }
-
-  loadInitialData() {
-    this.sliceService.query()
-      .subscribe(
-        res => {
-          this._slices.next(res);
-        },
-        err => console.log('Error retrieving Instances', err)
-      );
-  }
-
-  query() {
-    return this._slices.asObservable();
-  }
-
-}
diff --git a/src/app/services/websockets/websocket.global.ts b/src/app/services/websockets/websocket.global.ts
deleted file mode 100644
index 46bfbe1..0000000
--- a/src/app/services/websockets/websocket.global.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-/// <reference path="../../../../typings/index.d.ts"/>
-
-import {Injectable} from '@angular/core';
-import {Subject} from 'rxjs/Rx';
-import * as io from 'socket.io-client';
-import {AppConfig} from '../../config/app.config';
-import {IWSEvent} from '../../interfaces/ws.interface';
-
-@Injectable()
-export class GlobalEvent {
-  private _events: Subject<IWSEvent> = new Subject<IWSEvent>();
-  private socket;
-  constructor() {
-    this.socket = io(AppConfig.websocketClient);
-    this.socket.on('event', (data: IWSEvent): void => {
-      console.log('event', data);
-      this._events.next(data);
-    });
-  }
-  list() {
-    return this._events.asObservable();
-  }
-}
diff --git a/src/app/views/login/login.component.ts b/src/app/views/login/login.component.ts
deleted file mode 100644
index 96492e3..0000000
--- a/src/app/views/login/login.component.ts
+++ /dev/null
@@ -1,38 +0,0 @@
-/// <reference path="../../../../typings/index.d.ts"/>
-import {Component} from '@angular/core';
-import {Router} from '@angular/router';
-import {IAuthRequest, IAuthResponse} from '../../interfaces/auth.interface';
-import {StyleConfig} from '../../config/style.config';
-import {AuthService} from '../../services/rest/auth.service';
-
-export class Auth {
-  constructor(
-    public username: string,
-    public password: string
-  ) {
-  }
-}
-
-@Component({
-  selector: 'xos-login',
-  template: require('./login.html'),
-  providers: [AuthService],
-})
-export class LoginComponent {
-  public auth: IAuthRequest;
-  public brandName;
-  constructor(private AuthService: AuthService, private router: Router) {
-    this.auth = new Auth('', '');
-    this.brandName = StyleConfig.projectName;
-  }
-
-  onSubmit(auth: IAuthRequest) {
-    this.AuthService.login(auth)
-      .subscribe(
-        (user: IAuthResponse) => {
-          this.router.navigate(['/']);
-        }
-      );
-  }
-}
-
diff --git a/src/app/views/login/login.html b/src/app/views/login/login.html
deleted file mode 100644
index 0f8362c..0000000
--- a/src/app/views/login/login.html
+++ /dev/null
@@ -1,10 +0,0 @@
-<div class="login-container">
-  <div class="login-form">
-    <h2>Login to {{brandName}}</h2>
-    <form (ngSubmit)="onSubmit(loginForm.value)" #loginForm="ngForm">
-      <input type="email" [(ngModel)]="auth.username" name="username" required/>
-      <input type="password" [(ngModel)]="auth.password" name="password" required/>
-      <button type="submit" [disabled]="!loginForm.form.valid">Login</button>
-    </form>
-  </div>
-</div>
diff --git a/src/images/cord-favicon.png b/src/images/cord-favicon.png
deleted file mode 100644
index 758902e..0000000
--- a/src/images/cord-favicon.png
+++ /dev/null
Binary files differ
diff --git a/src/images/opencloud-favicon.png b/src/images/opencloud-favicon.png
deleted file mode 100644
index d49afe0..0000000
--- a/src/images/opencloud-favicon.png
+++ /dev/null
Binary files differ
diff --git a/src/index.html b/src/index.html
index 6d6e8c1..591a249 100644
--- a/src/index.html
+++ b/src/index.html
@@ -3,13 +3,13 @@
   <head>
     <base href="/">
     <meta charset="utf-8">
-    <title>XOS</title>
+    <title>FountainJS</title>
     <meta name="description" content="">
     <meta name="viewport" content="width=device-width">
-    <link rel="icon" type="image/png" href="images/cord-favicon.png" />
+    <link rel="icon" type="image/png" href="http://fountainjs.io/assets/imgs/fountain.png" />
   </head>
 
-  <body>
-    <xos-root>Loading XOS...</xos-root>
+  <body ng-app="app">
+    <ui-view></ui-view>
   </body>
 </html>
diff --git a/src/index.scss b/src/index.scss
index f1df96a..2cbe173 100644
--- a/src/index.scss
+++ b/src/index.scss
@@ -1,3 +1,65 @@
-body {
-  background-color: lightgrey;
+
+
+html, body, #root {
+  margin: 0;
+  height: 100%;
+  font-family: 'Open Sans', sans-serif;
+}
+
+body, h1, h2, h3 {
+  font-weight: 300
+}
+
+a {
+  color: white;
+  text-decoration: none;
+
+  &:hover {
+    color: #5aadbb;
+  }
+}
+
+.main-container {
+  display: flex;
+  flex-direction: column;
+  min-height: 100%;
+}
+.main {
+  flex: 1;
+  display: flex;
+  flex-direction: row;
+
+  .content {
+    display: flex;
+    flex: 1;
+    flex-direction: column;
+    flex-basis: 90%;
+    background: darken(grey, 25);
+    padding: 20px;
+  }
+}
+
+.header {
+  display: flex;
+  align-items: center;
+  background-color: #1f1f1f;
+}
+.header-title {
+  flex: 1;
+  font-size: 1.5rem;
+  margin: 1rem;
+}
+.header-date {
+  flex: 1;
+  text-align: right;
+  margin: 1rem;
+  white: white;
+}
+
+.footer {
+  padding: 0.5rem;
+  font-size: 1rem;
+  background-color: #1f1f1f;
+  text-align: center;
+  color: white;
 }
diff --git a/src/index.spec.js b/src/index.spec.js
index 4a2f55b..8c19f76 100644
--- a/src/index.spec.js
+++ b/src/index.spec.js
@@ -1,46 +1,4 @@
-Error.stackTraceLimit = Infinity;
-require('core-js/client/shim');
-
-require('@angular/common');
-require('rxjs');
-
-require('zone.js/dist/zone');
-require('zone.js/dist/long-stack-trace-zone');
-require('zone.js/dist/proxy');
-require('zone.js/dist/sync-test');
-require('zone.js/dist/jasmine-patch');
-require('zone.js/dist/async-test');
-require('zone.js/dist/fake-async-test');
-require('jquery');
-
-// loading app files
 const context = require.context('./app', true, /\.(js|ts|tsx)$/);
-context.keys().forEach(context);
-
-// use this for debug
-// context.keys().forEach(function(path) {
-//   try {
-//     context(path);
-//   } catch(err) {
-//     console.error('[ERROR] WITH SPEC FILE: ', path);
-//     console.error(err);
-//   }
-// });
-
-// loading specs
-const specFiles = require.context('../spec', true, /\.(js|ts|tsx)$/);
-specFiles.keys().forEach(specFiles);
-// use this for debug
-// specFiles.keys().forEach(function(path) {
-//   try {
-//     specFiles(path);
-//   } catch(err) {
-//     console.error('[ERROR] WITH SPEC FILE: ', path);
-//     console.error(err);
-//   }
-// });
-
-const testing = require('@angular/core/testing');
-const testingBrowser = require('@angular/platform-browser-dynamic/testing');
-
-testing.TestBed.initTestEnvironment(testingBrowser.BrowserDynamicTestingModule, testingBrowser.platformBrowserDynamicTesting());
+context.keys().forEach(function(f) {
+  context(f);
+});
diff --git a/src/index.ts b/src/index.ts
index baed6f9..66a32f1 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -1,24 +1,25 @@
-/// <reference path="../typings/index.d.ts"/>
+/// <reference path="../typings/index.d.ts" />
 
-import 'core-js/client/shim';
-import 'zone.js/dist/zone';
+import * as angular from 'angular';
 
-import '@angular/common';
-import 'rxjs';
+import 'angular-ui-router';
+import 'angular-resource';
+import 'angular-cookies';
+import routesConfig from './routes';
+
+import {main} from './app/main';
 
 import './index.scss';
+import {xosCore} from './app/core/index';
+import {xosRest} from './app/rest/index';
+import {xosViews} from './app/views/index';
+import {interceptorConfig, userStatusInterceptor, CredentialsInterceptor} from './interceptors';
 
-import {enableProdMode} from '@angular/core';
-import {platformBrowserDynamic} from '@angular/platform-browser-dynamic';
-import {AppModule} from './app';
+angular
+  .module('app', [xosCore, xosRest, xosViews, 'ui.router', 'ngResource'])
+  .config(routesConfig)
+  .config(interceptorConfig)
+  .factory('UserStatusInterceptor', userStatusInterceptor)
+  .factory('CredentialsInterceptor', CredentialsInterceptor)
+  .component('xos', main);
 
-declare var process: any;
-
-if (process.env.NODE_ENV === 'production') {
-  enableProdMode();
-} else {
-  Error['stackTraceLimit'] = Infinity; // tslint:disable-line:no-string-literal
-  require('zone.js/dist/long-stack-trace-zone'); // tslint:disable-line:no-var-requires
-}
-
-platformBrowserDynamic().bootstrapModule(AppModule);
diff --git a/src/interceptors.ts b/src/interceptors.ts
new file mode 100644
index 0000000..bd4cba3
--- /dev/null
+++ b/src/interceptors.ts
@@ -0,0 +1,39 @@
+/// <reference path="../typings/index.d.ts" />
+
+export function interceptorConfig($httpProvider: angular.IHttpProvider, $resourceProvider: angular.resource.IResourceServiceProvider) {
+  $httpProvider.interceptors.push('UserStatusInterceptor');
+  $httpProvider.interceptors.push('CredentialsInterceptor');
+  $resourceProvider.defaults.stripTrailingSlashes = false;
+}
+
+export function userStatusInterceptor($state: angular.ui.IStateService) {
+
+  const checkLogin = (res) => {
+    if (res.status === 403) {
+      $state.go('login');
+    }
+    else if (res.data.status === 403) {
+      $state.go('login');
+    }
+    return res;
+  };
+
+  return {
+    response: checkLogin,
+    responseError: checkLogin
+  };
+}
+
+export function CredentialsInterceptor($cookies: angular.cookies.ICookiesService) {
+  return {
+    request: (req) => {
+      if (!$cookies.get('xoscsrftoken') || !$cookies.get('xossessionid')) {
+        return req;
+      }
+      req.headers['X-CSRFToken'] = $cookies.get('xoscsrftoken');
+      req.headers['x-csrftoken'] = $cookies.get('xoscsrftoken');
+      req.headers['x-sessionid'] = $cookies.get('xossessionid');
+      return req;
+    }
+  };
+}
diff --git a/src/routes.ts b/src/routes.ts
new file mode 100644
index 0000000..3c8ae3d
--- /dev/null
+++ b/src/routes.ts
@@ -0,0 +1,43 @@
+/// <reference path="../typings/index.d.ts" />
+
+export default routesConfig;
+
+/** @ngInject */
+function routesConfig($stateProvider: angular.ui.IStateProvider, $urlRouterProvider: angular.ui.IUrlRouterProvider, $locationProvider: angular.ILocationProvider) {
+  $locationProvider.html5Mode(false).hashPrefix('');
+  $urlRouterProvider.otherwise('/');
+
+  $stateProvider
+    .state('xos', {
+      abstract: true,
+      url: '/',
+      component: 'xos'
+    })
+    .state('xos.dashboard', {
+      url: '',
+      parent: 'xos',
+      template: '<h1>Dashboard</h1>'
+    })
+    .state('xos.instances', {
+      url: 'instances',
+      parent: 'xos',
+      template: '<h1>Instances</h1>'
+    })
+    .state('xos.slices', {
+      url: 'slices',
+      parent: 'xos',
+      component: `xosCrud`,
+      data: {
+        title: 'Slices',
+        resource: 'SlicesRest',
+        xosTableCfg: {
+          columns: ['name', 'default_isolation']
+        }
+      }
+    })
+    .state('xos.nodes', {
+      url: 'nodes',
+      parent: 'xos',
+      template: '<h1>Nodes</h1>'
+    });
+}
diff --git a/tsconfig.json b/tsconfig.json
index 8212a16..c516fb7 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -3,11 +3,8 @@
     "sourceMap": true,
     "emitDecoratorMetadata": true,
     "experimentalDecorators": true,
-    "moduleResolution": "node",
     "removeComments": false,
-    "noImplicitAny": false,
-    "noEmitOnError": false,
-    "target": "es5"
+    "noImplicitAny": false
   },
   "compileOnSave": false,
   "include": [
diff --git a/tslint.json b/tslint.json
index 5a95833..d847299 100644
--- a/tslint.json
+++ b/tslint.json
@@ -1,26 +1,5 @@
 {
-  "rulesDirectory": [
-    "node_modules/codelyzer"
-  ],
   "rules": {
-    "directive-selector-name": [true, "camelCase"],
-    "component-selector-name": [true, "kebab-case"],
-    "directive-selector-type": [true, "attribute"],
-    "component-selector-type": [true, "element"],
-    "directive-selector-prefix": [true, "xos"],
-    "component-selector-prefix": [true, "xos"],
-    "use-input-property-decorator": true,
-    "use-output-property-decorator": true,
-    "use-host-property-decorator": true,
-    "no-attribute-parameter-decorator": true,
-    "no-input-rename": true,
-    "no-output-rename": true,
-    "no-forward-ref" :true,
-    "use-life-cycle-interface": true,
-    "use-pipe-transform-interface": true,
-    "pipe-naming": [true, "camelCase", "xos"],
-    "component-class-suffix": true,
-    "directive-class-suffix": true,
     "ban": [true,
       ["_", "extend"],
       ["_", "isNull"],
@@ -28,7 +7,8 @@
     ],
     "class-name": true,
     "comment-format": [true,
-      "check-space"
+      "check-space",
+      "check-lowercase"
     ],
     "curly": true,
     "eofline": true,
diff --git a/typings.json b/typings.json
index cb99e10..700269c 100644
--- a/typings.json
+++ b/typings.json
@@ -1,9 +1,13 @@
 {
   "globalDependencies": {
+    "angular": "registry:dt/angular#1.5.0+20161208205636",
+    "angular-cookies": "registry:dt/angular-cookies#1.4.0+20160317120654",
+    "angular-mocks": "github:DefinitelyTyped/DefinitelyTyped/angularjs/angular-mocks.d.ts#dc9dabe74a5be62613b17a3605309783a12ff28a",
+    "angular-resource": "registry:dt/angular-resource#1.5.0+20161114123626",
+    "angular-ui-router": "registry:dt/angular-ui-router#1.1.5+20160707113237",
     "es6-shim": "registry:dt/es6-shim#0.31.2+20160602141504",
     "jasmine": "github:DefinitelyTyped/DefinitelyTyped/jasmine/jasmine.d.ts#dc9dabe74a5be62613b17a3605309783a12ff28a",
-    "jquery": "registry:dt/jquery#1.10.0+20160929162922",
-    "require": "registry:dt/require#2.1.20+20160316155526",
-    "socket.io-client": "registry:dt/socket.io-client#1.4.4+20160317120654"
+    "jquery": "github:DefinitelyTyped/DefinitelyTyped/jquery/jquery.d.ts#dc9dabe74a5be62613b17a3605309783a12ff28a",
+    "require": "registry:dt/require#2.1.20+20160316155526"
   }
 }
diff --git a/typings/globals/angular-cookies/index.d.ts b/typings/globals/angular-cookies/index.d.ts
new file mode 100644
index 0000000..3865afa
--- /dev/null
+++ b/typings/globals/angular-cookies/index.d.ts
@@ -0,0 +1,85 @@
+// Generated by typings
+// Source: https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/7de6c3dd94feaeb21f20054b9f30d5dabc5efabd/angularjs/angular-cookies.d.ts
+declare module "angular-cookies" {
+    var _: string;
+    export = _;
+}
+
+/**
+ * ngCookies module (angular-cookies.js)
+ */
+declare namespace angular.cookies {
+
+    /**
+    * Cookies options
+    * see https://docs.angularjs.org/api/ngCookies/provider/$cookiesProvider#defaults
+    */
+    interface ICookiesOptions {
+        /**
+        * The cookie will be available only for this path and its sub-paths.
+        * By default, this would be the URL that appears in your base tag.
+        */
+        path?: string;
+        /**
+        * The cookie will be available only for this domain and its sub-domains.
+        * For obvious security reasons the user agent will not accept the cookie if the
+        * current domain is not a sub domain or equals to the requested domain.
+        */
+        domain?: string;
+        /**
+        * String of the form "Wdy, DD Mon YYYY HH:MM:SS GMT" or a Date object
+        * indicating the exact date/time this cookie will expire.
+        */
+        expires?: string|Date;
+        /**
+        * The cookie will be available only in secured connection.
+        */
+        secure?: boolean;
+    }
+
+    /**
+     * CookieService
+     * see http://docs.angularjs.org/api/ngCookies.$cookies
+     */
+    interface ICookiesService {
+        [index: string]: any;
+    }
+
+    /**
+     * CookieStoreService
+     * see http://docs.angularjs.org/api/ngCookies.$cookieStore
+     */
+    interface ICookiesService {
+        get(key: string): string;
+        getObject(key: string): any;
+        getObject<T>(key: string): T;
+        getAll(): any;
+        put(key: string, value: string, options?: ICookiesOptions): void;
+        putObject(key: string, value: any, options?: ICookiesOptions): void;
+        remove(key: string, options?: ICookiesOptions): void;
+    }
+
+    /**
+     * CookieStoreService DEPRECATED
+     * see https://code.angularjs.org/1.2.26/docs/api/ngCookies/service/$cookieStore
+     */
+    interface ICookieStoreService {
+        /**
+         * Returns the value of given cookie key
+         * @param key Id to use for lookup
+         */
+        get(key: string): any;
+        /**
+         * Sets a value for given cookie key
+         * @param key Id for the value
+         * @param value Value to be stored
+         */
+        put(key: string, value: any): void;
+        /**
+         * Remove given cookie
+         * @param key Id of the key-value pair to delete
+         */
+        remove(key: string): void;
+    }
+
+}
diff --git a/typings/globals/angular-cookies/typings.json b/typings/globals/angular-cookies/typings.json
new file mode 100644
index 0000000..956cbcd
--- /dev/null
+++ b/typings/globals/angular-cookies/typings.json
@@ -0,0 +1,8 @@
+{
+  "resolution": "main",
+  "tree": {
+    "src": "https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/7de6c3dd94feaeb21f20054b9f30d5dabc5efabd/angularjs/angular-cookies.d.ts",
+    "raw": "registry:dt/angular-cookies#1.4.0+20160317120654",
+    "typings": "https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/7de6c3dd94feaeb21f20054b9f30d5dabc5efabd/angularjs/angular-cookies.d.ts"
+  }
+}
diff --git a/typings/globals/angular-mocks/index.d.ts b/typings/globals/angular-mocks/index.d.ts
new file mode 100644
index 0000000..0038bdc
--- /dev/null
+++ b/typings/globals/angular-mocks/index.d.ts
@@ -0,0 +1,313 @@
+// Generated by typings
+// Source: https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/dc9dabe74a5be62613b17a3605309783a12ff28a/angularjs/angular-mocks.d.ts
+declare module "angular-mocks/ngMock" {
+    var _: string;
+    export = _;
+}
+
+declare module "angular-mocks/ngMockE2E" {
+    var _: string;
+    export = _;
+}
+
+declare module "angular-mocks/ngAnimateMock" {
+    var _: string;
+    export = _;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+// ngMock module (angular-mocks.js)
+///////////////////////////////////////////////////////////////////////////////
+declare module angular {
+
+    ///////////////////////////////////////////////////////////////////////////
+    // AngularStatic
+    // We reopen it to add the MockStatic definition
+    ///////////////////////////////////////////////////////////////////////////
+    interface IAngularStatic {
+        mock: IMockStatic;
+    }
+    
+    // see https://docs.angularjs.org/api/ngMock/function/angular.mock.inject
+    interface IInjectStatic {
+        (...fns: Function[]): any;
+        (...inlineAnnotatedConstructor: any[]): any; // this overload is undocumented, but works
+        strictDi(val?: boolean): void;
+    }
+
+    interface IMockStatic {
+        // see https://docs.angularjs.org/api/ngMock/function/angular.mock.dump
+        dump(obj: any): string;
+
+        inject: IInjectStatic
+
+        // see https://docs.angularjs.org/api/ngMock/function/angular.mock.module
+        module(...modules: any[]): any;
+
+        // see https://docs.angularjs.org/api/ngMock/type/angular.mock.TzDate
+        TzDate(offset: number, timestamp: number): Date;
+        TzDate(offset: number, timestamp: string): Date;
+    }
+
+    ///////////////////////////////////////////////////////////////////////////
+    // ExceptionHandlerService
+    // see https://docs.angularjs.org/api/ngMock/service/$exceptionHandler
+    // see https://docs.angularjs.org/api/ngMock/provider/$exceptionHandlerProvider
+    ///////////////////////////////////////////////////////////////////////////
+    interface IExceptionHandlerProvider extends IServiceProvider {
+        mode(mode: string): void;
+    }
+
+    ///////////////////////////////////////////////////////////////////////////
+    // TimeoutService
+    // see https://docs.angularjs.org/api/ngMock/service/$timeout
+    // Augments the original service
+    ///////////////////////////////////////////////////////////////////////////
+    interface ITimeoutService {
+        flush(delay?: number): void;
+        flushNext(expectedDelay?: number): void;
+        verifyNoPendingTasks(): void;
+    }
+
+    ///////////////////////////////////////////////////////////////////////////
+    // IntervalService
+    // see https://docs.angularjs.org/api/ngMock/service/$interval
+    // Augments the original service
+    ///////////////////////////////////////////////////////////////////////////
+    interface IIntervalService {
+        flush(millis?: number): number;
+    }
+
+    ///////////////////////////////////////////////////////////////////////////
+    // LogService
+    // see https://docs.angularjs.org/api/ngMock/service/$log
+    // Augments the original service
+    ///////////////////////////////////////////////////////////////////////////
+    interface ILogService {
+        assertEmpty(): void;
+        reset(): void;
+    }
+
+    interface ILogCall {
+        logs: string[];
+    }
+
+    ///////////////////////////////////////////////////////////////////////////
+    // HttpBackendService
+    // see https://docs.angularjs.org/api/ngMock/service/$httpBackend
+    ///////////////////////////////////////////////////////////////////////////
+    interface IHttpBackendService {
+        /**
+          * Flushes all pending requests using the trained responses.
+          * @param count Number of responses to flush (in the order they arrived). If undefined, all pending requests will be flushed. 
+          */
+        flush(count?: number): void;
+        
+        /**
+          * Resets all request expectations, but preserves all backend definitions.
+          */
+        resetExpectations(): void;
+        
+        /**
+          * Verifies that all of the requests defined via the expect api were made. If any of the requests were not made, verifyNoOutstandingExpectation throws an exception.
+          */
+        verifyNoOutstandingExpectation(): void;
+        
+        /**
+          * Verifies that there are no outstanding requests that need to be flushed.
+          */
+        verifyNoOutstandingRequest(): void;
+
+        /**
+          * Creates a new request expectation. 
+          * Throws a preformatted error if expectation(s) don't match supplied string, regular expression, object, or if function returns false.
+          * Returns an object with respond method that controls how a matched request is handled.
+          * @param method HTTP method.
+          * @param url HTTP url string, regular expression or function that receives a url and returns true if the url matches the current expctation.
+          * @param data HTTP request body string, json object, regular expression or function that receives the data and returns true if the data matches the current expectation.
+          * @param headers HTTP headers object or function that receives the headers and returns true if the headers match the current expectation.
+          */
+        expect(method: string, url: string | RegExp | ((url: string) => boolean), data?: string | RegExp | Object | ((data: string) => boolean), headers?: Object | ((object: Object) => boolean)) :mock.IRequestHandler;
+
+        /**
+          * Creates a new request expectation for DELETE requests.
+          * Throws a preformatted error if expectation(s) don't match supplied string, regular expression, object, or if function returns false.
+          * Returns an object with respond method that controls how a matched request is handled.
+          * @param url HTTP url string, regular expression or function that receives a url and returns true if the url is as expected.
+          * @param headers HTTP headers object to be compared with the HTTP headers in the request.
+        */
+        expectDELETE(url: string | RegExp | ((url: string) => boolean), headers?: Object): mock.IRequestHandler;
+
+        /**
+          * Creates a new request expectation for GET requests.
+          * Throws a preformatted error if expectation(s) don't match supplied string, regular expression, object, or if function returns false.
+          * Returns an object with respond method that controls how a matched request is handled.
+          * @param url HTTP url string, regular expression or function that receives a url and returns true if the url matches the current expctation.
+          * @param headers HTTP headers object to be compared with the HTTP headers in the request.
+          */
+        expectGET(url: string | RegExp | ((url: string) => boolean), headers?: Object): mock.IRequestHandler;
+
+        /**
+          * Creates a new request expectation for HEAD requests.
+          * Throws a preformatted error if expectation(s) don't match supplied string, regular expression, object, or if function returns false.
+          * Returns an object with respond method that controls how a matched request is handled.
+          * @param url HTTP url string, regular expression or function that receives a url and returns true if the url matches the current expctation.
+          * @param headers HTTP headers object to be compared with the HTTP headers in the request.
+          */
+        expectHEAD(url: string | RegExp | ((url: string) => boolean), headers?: Object): mock.IRequestHandler;
+        
+        /**
+          * Creates a new request expectation for JSONP requests.
+          * Throws a preformatted error if expectation(s) don't match supplied string, regular expression, or if function returns false.
+          * Returns an object with respond method that controls how a matched request is handled.
+          * @param url HTTP url string, regular expression or function that receives a url and returns true if the url matches the current expctation.
+          */        
+        expectJSONP(url: string | RegExp | ((url: string) => boolean)): mock.IRequestHandler;
+
+        /**
+          * Creates a new request expectation for PATCH requests. 
+          * Throws a preformatted error if expectation(s) don't match supplied string, regular expression, object, or if function returns false.
+          * Returns an object with respond method that controls how a matched request is handled.
+          * @param url HTTP url string, regular expression or function that receives a url and returns true if the url matches the current expctation.
+          * @param data HTTP request body string, json object, regular expression or function that receives the data and returns true if the data matches the current expectation.
+          * @param headers HTTP headers object or function that receives the headers and returns true if the headers match the current expectation.
+          */
+        expectPATCH(url: string | RegExp | ((url: string) => boolean), data?: string | RegExp | Object | ((data: string) => boolean), headers?: Object): mock.IRequestHandler;
+
+        /**
+          * Creates a new request expectation for POST requests. 
+          * Throws a preformatted error if expectation(s) don't match supplied string, regular expression, object, or if function returns false.
+          * Returns an object with respond method that controls how a matched request is handled.
+          * @param url HTTP url string, regular expression or function that receives a url and returns true if the url matches the current expctation.
+          * @param data HTTP request body string, json object, regular expression or function that receives the data and returns true if the data matches the current expectation.
+          * @param headers HTTP headers object or function that receives the headers and returns true if the headers match the current expectation.
+          */
+        expectPOST(url: string | RegExp | ((url: string) => boolean), data?: string | RegExp | Object | ((data: string) => boolean), headers?: Object): mock.IRequestHandler;
+
+        /**
+          * Creates a new request expectation for PUT requests. 
+          * Throws a preformatted error if expectation(s) don't match supplied string, regular expression, object, or if function returns false.
+          * Returns an object with respond method that controls how a matched request is handled.
+          * @param url HTTP url string, regular expression or function that receives a url and returns true if the url matches the current expctation.
+          * @param data HTTP request body string, json object, regular expression or function that receives the data and returns true if the data matches the current expectation.
+          * @param headers HTTP headers object or function that receives the headers and returns true if the headers match the current expectation.
+          */
+        expectPUT(url: string | RegExp | ((url: string) => boolean), data?: string | RegExp | Object | ((data: string) => boolean), headers?: Object): mock.IRequestHandler;
+
+        /**
+          * Creates a new backend definition. 
+          * Returns an object with respond method that controls how a matched request is handled.
+          * @param method HTTP method.
+          * @param url HTTP url string, regular expression or function that receives a url and returns true if the url matches the current expctation.
+          * @param data HTTP request body string, json object, regular expression or function that receives the data and returns true if the data matches the current expectation.
+          * @param headers HTTP headers object or function that receives the headers and returns true if the headers match the current expectation.
+          */
+        when(method: string, url: string | RegExp | ((url: string) => boolean), data?: string | RegExp | Object | ((data: string) => boolean), headers?: Object | ((object: Object) => boolean)): mock.IRequestHandler;
+
+        /**
+          * Creates a new backend definition for DELETE requests. 
+          * Returns an object with respond method that controls how a matched request is handled.
+          * @param url HTTP url string, regular expression or function that receives a url and returns true if the url matches the current expctation.
+          * @param headers HTTP headers object or function that receives the headers and returns true if the headers match the current expectation.
+          */
+        whenDELETE(url: string | RegExp | ((url: string) => boolean), headers?: Object | ((object: Object) => boolean)): mock.IRequestHandler;
+
+        /**
+          * Creates a new backend definition for GET requests. 
+          * Returns an object with respond method that controls how a matched request is handled.
+          * @param url HTTP url string, regular expression or function that receives a url and returns true if the url matches the current expctation.
+          * @param headers HTTP headers object or function that receives the headers and returns true if the headers match the current expectation.
+          */
+        whenGET(url: string | RegExp | ((url: string) => boolean), headers?: Object | ((object: Object) => boolean)): mock.IRequestHandler;
+
+        /**
+          * Creates a new backend definition for HEAD requests. 
+          * Returns an object with respond method that controls how a matched request is handled.
+          * @param url HTTP url string, regular expression or function that receives a url and returns true if the url matches the current expctation.
+          * @param headers HTTP headers object or function that receives the headers and returns true if the headers match the current expectation.
+          */
+        whenHEAD(url: string | RegExp | ((url: string) => boolean), headers?: Object | ((object: Object) => boolean)): mock.IRequestHandler;
+
+        /**
+          * Creates a new backend definition for JSONP requests. 
+          * Returns an object with respond method that controls how a matched request is handled.
+          * @param url HTTP url string, regular expression or function that receives a url and returns true if the url matches the current expctation.
+          * @param headers HTTP headers object or function that receives the headers and returns true if the headers match the current expectation.
+          */
+        whenJSONP(url: string | RegExp | ((url: string) => boolean)): mock.IRequestHandler;
+
+        /**
+          * Creates a new backend definition for PATCH requests. 
+          * Returns an object with respond method that controls how a matched request is handled.
+          * @param url HTTP url string, regular expression or function that receives a url and returns true if the url matches the current expctation.
+          * @param data HTTP request body string, json object, regular expression or function that receives the data and returns true if the data matches the current expectation.
+          * @param headers HTTP headers object or function that receives the headers and returns true if the headers match the current expectation.
+          */
+        whenPATCH(url: string | RegExp | ((url: string) => boolean), data?: string | RegExp | Object | ((data: string) => boolean), headers?: Object | ((object: Object) => boolean)): mock.IRequestHandler;
+
+        /**
+          * Creates a new backend definition for POST requests. 
+          * Returns an object with respond method that controls how a matched request is handled.
+          * @param url HTTP url string, regular expression or function that receives a url and returns true if the url matches the current expctation.
+          * @param data HTTP request body string, json object, regular expression or function that receives the data and returns true if the data matches the current expectation.
+          * @param headers HTTP headers object or function that receives the headers and returns true if the headers match the current expectation.
+          */
+        whenPOST(url: string | RegExp | ((url: string) => boolean), data?: string | RegExp | Object | ((data: string) => boolean), headers?: Object | ((object: Object) => boolean)): mock.IRequestHandler;
+
+        /**
+          * Creates a new backend definition for PUT requests. 
+          * Returns an object with respond method that controls how a matched request is handled.
+          * @param url HTTP url string, regular expression or function that receives a url and returns true if the url matches the current expctation.
+          * @param data HTTP request body string, json object, regular expression or function that receives the data and returns true if the data matches the current expectation.
+          * @param headers HTTP headers object or function that receives the headers and returns true if the headers match the current expectation.
+          */
+        whenPUT(url: string | RegExp | ((url: string) => boolean), data?: string | RegExp | Object | ((data: string) => boolean), headers?: Object | ((object: Object) => boolean)): mock.IRequestHandler;
+    }
+
+    export module mock {
+        // returned interface by the the mocked HttpBackendService expect/when methods
+        interface IRequestHandler {
+          
+            /**
+              * Controls the response for a matched request using a function to construct the response. 
+              * Returns the RequestHandler object for possible overrides.
+              * @param func Function that receives the request HTTP method, url, data, and headers and returns an array containing response status (number), data, headers, and status text.
+              */
+            respond(func: ((method: string, url: string, data: string | Object, headers: Object) => [number, string | Object, Object, string])): IRequestHandler;
+
+            /**
+              * Controls the response for a matched request using supplied static data to construct the response. 
+              * Returns the RequestHandler object for possible overrides.
+              * @param status HTTP status code to add to the response.
+              * @param data Data to add to the response.
+              * @param headers Headers object to add to the response.
+              * @param responseText Response text to add to the response.
+              */
+            respond(status: number, data: string | Object, headers?: Object, responseText?: string): IRequestHandler;
+
+            /**
+              * Controls the response for a matched request using the HTTP status code 200 and supplied static data to construct the response. 
+              * Returns the RequestHandler object for possible overrides.
+              * @param data Data to add to the response.
+              * @param headers Headers object to add to the response.
+              * @param responseText Response text to add to the response.
+              */
+            respond(data: string | Object, headers?: Object, responseText?: string): IRequestHandler;
+
+            // Available when ngMockE2E is loaded
+            /**
+              * Any request matching a backend definition or expectation with passThrough handler will be passed through to the real backend (an XHR request will be made to the server.)
+              */
+            passThrough(): IRequestHandler;
+        }
+
+    }
+
+}
+
+///////////////////////////////////////////////////////////////////////////////
+// functions attached to global object (window)
+///////////////////////////////////////////////////////////////////////////////
+//Use `angular.mock.module` instead of `module`, as `module` conflicts with commonjs.
+//declare var module: (...modules: any[]) => any;
+declare var inject: angular.IInjectStatic;
diff --git a/typings/globals/angular-mocks/typings.json b/typings/globals/angular-mocks/typings.json
new file mode 100644
index 0000000..b6adead
--- /dev/null
+++ b/typings/globals/angular-mocks/typings.json
@@ -0,0 +1,8 @@
+{
+  "resolution": "main",
+  "tree": {
+    "src": "https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/dc9dabe74a5be62613b17a3605309783a12ff28a/angularjs/angular-mocks.d.ts",
+    "raw": "github:DefinitelyTyped/DefinitelyTyped/angularjs/angular-mocks.d.ts#dc9dabe74a5be62613b17a3605309783a12ff28a",
+    "typings": "https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/dc9dabe74a5be62613b17a3605309783a12ff28a/angularjs/angular-mocks.d.ts"
+  }
+}
diff --git a/typings/globals/angular-resource/index.d.ts b/typings/globals/angular-resource/index.d.ts
new file mode 100644
index 0000000..0496d92
--- /dev/null
+++ b/typings/globals/angular-resource/index.d.ts
@@ -0,0 +1,204 @@
+// Generated by typings
+// Source: https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/19854af46f2bcd37cf416341ce74ef03ab1717b9/angularjs/angular-resource.d.ts
+declare module 'angular-resource' {
+    var _: string;
+    export = _;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+// ngResource module (angular-resource.js)
+///////////////////////////////////////////////////////////////////////////////
+declare namespace angular.resource {
+
+    /**
+     * Currently supported options for the $resource factory options argument.
+     */
+    interface IResourceOptions {
+        /**
+         * If true then the trailing slashes from any calculated URL will be stripped (defaults to true)
+         */
+        stripTrailingSlashes?: boolean;
+        /**
+         * If true, the request made by a "non-instance" call will be cancelled (if not already completed) by calling
+         * $cancelRequest() on the call's return value. This can be overwritten per action. (Defaults to false.)
+         */
+        cancellable?: boolean;
+    }
+
+
+    ///////////////////////////////////////////////////////////////////////////
+    // ResourceService
+    // see http://docs.angularjs.org/api/ngResource.$resource
+    // Most part of the following definitions were achieved by analyzing the
+    // actual implementation, since the documentation doesn't seem to cover
+    // that deeply.
+    ///////////////////////////////////////////////////////////////////////////
+    interface IResourceService {
+        (url: string, paramDefaults?: any,
+            /** example:  {update: { method: 'PUT' }, delete: deleteDescriptor }
+             where deleteDescriptor : IActionDescriptor */
+            actions?: IActionHash, options?: IResourceOptions): IResourceClass<IResource<any>>;
+        <T, U>(url: string, paramDefaults?: any,
+            /** example:  {update: { method: 'PUT' }, delete: deleteDescriptor }
+             where deleteDescriptor : IActionDescriptor */
+            actions?: IActionHash, options?: IResourceOptions): U;
+        <T>(url: string, paramDefaults?: any,
+            /** example:  {update: { method: 'PUT' }, delete: deleteDescriptor }
+             where deleteDescriptor : IActionDescriptor */
+            actions?: IActionHash, options?: IResourceOptions): IResourceClass<T>;
+    }
+
+    // Hash of action descriptors allows custom action names
+    interface IActionHash {
+        [action: string]: IActionDescriptor
+    }
+
+    // Just a reference to facilitate describing new actions
+    interface IActionDescriptor {
+        method: string;
+        params?: any;
+        url?: string;
+        isArray?: boolean;
+        transformRequest?: angular.IHttpRequestTransformer | angular.IHttpRequestTransformer[];
+        transformResponse?: angular.IHttpResponseTransformer | angular.IHttpResponseTransformer[];
+        headers?: any;
+        cache?: boolean | angular.ICacheObject;
+        /**
+         * Note: In contrast to $http.config, promises are not supported in $resource, because the same value
+         * would be used for multiple requests. If you are looking for a way to cancel requests, you should
+         * use the cancellable option.
+         */
+        timeout?: number
+        cancellable?: boolean;
+        withCredentials?: boolean;
+        responseType?: string;
+        interceptor?: IHttpInterceptor;
+    }
+
+    // Allow specify more resource methods
+    // No need to add duplicates for all four overloads.
+    interface IResourceMethod<T> {
+        (): T;
+        (params: Object): T;
+        (success: Function, error?: Function): T;
+        (params: Object, success: Function, error?: Function): T;
+        (params: Object, data: Object, success?: Function, error?: Function): T;
+    }
+
+    // Allow specify resource moethod which returns the array
+    // No need to add duplicates for all four overloads.
+    interface IResourceArrayMethod<T> {
+        (): IResourceArray<T>;
+        (params: Object): IResourceArray<T>;
+        (success: Function, error?: Function): IResourceArray<T>;
+        (params: Object, success: Function, error?: Function): IResourceArray<T>;
+        (params: Object, data: Object, success?: Function, error?: Function): IResourceArray<T>;
+    }
+
+    // Baseclass for every resource with default actions.
+    // If you define your new actions for the resource, you will need
+    // to extend this interface and typecast the ResourceClass to it.
+    //
+    // In case of passing the first argument as anything but a function,
+    // it's gonna be considered data if the action method is POST, PUT or
+    // PATCH (in other words, methods with body). Otherwise, it's going
+    // to be considered as parameters to the request.
+    // https://github.com/angular/angular.js/blob/v1.2.0/src/ngResource/resource.js#L461-L465
+    //
+    // Only those methods with an HTTP body do have 'data' as first parameter:
+    // https://github.com/angular/angular.js/blob/v1.2.0/src/ngResource/resource.js#L463
+    // More specifically, those methods are POST, PUT and PATCH:
+    // https://github.com/angular/angular.js/blob/v1.2.0/src/ngResource/resource.js#L432
+    //
+    // Also, static calls always return the IResource (or IResourceArray) retrieved
+    // https://github.com/angular/angular.js/blob/v1.2.0/src/ngResource/resource.js#L538-L549
+    interface IResourceClass<T> {
+        new(dataOrParams? : any) : T & IResource<T>;
+        get: IResourceMethod<T>;
+
+        query: IResourceArrayMethod<T>;
+
+        save: IResourceMethod<T>;
+
+        remove: IResourceMethod<T>;
+
+        delete: IResourceMethod<T>;
+    }
+
+    // Instance calls always return the the promise of the request which retrieved the object
+    // https://github.com/angular/angular.js/blob/v1.2.0/src/ngResource/resource.js#L538-L546
+    interface IResource<T> {
+        $get(): angular.IPromise<T>;
+        $get(params?: Object, success?: Function, error?: Function): angular.IPromise<T>;
+        $get(success: Function, error?: Function): angular.IPromise<T>;
+
+        $query(): angular.IPromise<IResourceArray<T>>;
+        $query(params?: Object, success?: Function, error?: Function): angular.IPromise<IResourceArray<T>>;
+        $query(success: Function, error?: Function): angular.IPromise<IResourceArray<T>>;
+
+        $save(): angular.IPromise<T>;
+        $save(params?: Object, success?: Function, error?: Function): angular.IPromise<T>;
+        $save(success: Function, error?: Function): angular.IPromise<T>;
+
+        $remove(): angular.IPromise<T>;
+        $remove(params?: Object, success?: Function, error?: Function): angular.IPromise<T>;
+        $remove(success: Function, error?: Function): angular.IPromise<T>;
+
+        $delete(): angular.IPromise<T>;
+        $delete(params?: Object, success?: Function, error?: Function): angular.IPromise<T>;
+        $delete(success: Function, error?: Function): angular.IPromise<T>;
+
+        $cancelRequest(): void;
+
+        /** the promise of the original server interaction that created this instance. **/
+        $promise : angular.IPromise<T>;
+        $resolved : boolean;
+        toJSON(): T;
+    }
+
+    /**
+     * Really just a regular Array object with $promise and $resolve attached to it
+     */
+    interface IResourceArray<T> extends Array<T & IResource<T>> {
+        $cancelRequest(): void;
+
+        /** the promise of the original server interaction that created this collection. **/
+        $promise : angular.IPromise<IResourceArray<T>>;
+        $resolved : boolean;
+    }
+
+    /** when creating a resource factory via IModule.factory */
+    interface IResourceServiceFactoryFunction<T> {
+        ($resource: angular.resource.IResourceService): IResourceClass<T>;
+        <U extends IResourceClass<T>>($resource: angular.resource.IResourceService): U;
+    }
+
+    // IResourceServiceProvider used to configure global settings
+    interface IResourceServiceProvider extends angular.IServiceProvider {
+
+        defaults: IResourceOptions;
+    }
+
+}
+
+/** extensions to base ng based on using angular-resource */
+declare namespace angular {
+
+    interface IModule {
+        /** creating a resource service factory */
+        factory(name: string, resourceServiceFactoryFunction: angular.resource.IResourceServiceFactoryFunction<any>): IModule;
+    }
+
+    namespace auto {
+    	interface IInjectorService {
+    		get(name: '$resource'): ng.resource.IResourceService;
+    	}
+    }
+}
+
+interface Array<T>
+{
+    /** the promise of the original server interaction that created this collection. **/
+    $promise : angular.IPromise<Array<T>>;
+    $resolved : boolean;
+}
diff --git a/typings/globals/angular-resource/typings.json b/typings/globals/angular-resource/typings.json
new file mode 100644
index 0000000..bc04b28
--- /dev/null
+++ b/typings/globals/angular-resource/typings.json
@@ -0,0 +1,8 @@
+{
+  "resolution": "main",
+  "tree": {
+    "src": "https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/19854af46f2bcd37cf416341ce74ef03ab1717b9/angularjs/angular-resource.d.ts",
+    "raw": "registry:dt/angular-resource#1.5.0+20161114123626",
+    "typings": "https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/19854af46f2bcd37cf416341ce74ef03ab1717b9/angularjs/angular-resource.d.ts"
+  }
+}
diff --git a/typings/globals/angular-ui-router/index.d.ts b/typings/globals/angular-ui-router/index.d.ts
new file mode 100644
index 0000000..47af08e
--- /dev/null
+++ b/typings/globals/angular-ui-router/index.d.ts
@@ -0,0 +1,367 @@
+// Generated by typings
+// Source: https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/b38cd68fe2dacaea0bb4efd6a3c638ceeae4fb25/angular-ui-router/angular-ui-router.d.ts
+declare module 'angular-ui-router' {
+    // Since angular-ui-router adds providers for a bunch of
+    // injectable dependencies, it doesn't really return any
+    // actual data except the plain string 'ui.router'.
+    //
+    // As such, I don't think anybody will ever use the actual
+    // default value of the module.  So I've only included the
+    // the types. (@xogeny)
+    export type IState = angular.ui.IState;
+    export type IStateProvider = angular.ui.IStateProvider;
+    export type IUrlMatcher = angular.ui.IUrlMatcher;
+    export type IUrlRouterProvider = angular.ui.IUrlRouterProvider;
+    export type IStateOptions = angular.ui.IStateOptions;
+    export type IHrefOptions = angular.ui.IHrefOptions;
+    export type IStateService = angular.ui.IStateService;
+    export type IResolvedState = angular.ui.IResolvedState;
+    export type IStateParamsService = angular.ui.IStateParamsService;
+    export type IUrlRouterService = angular.ui.IUrlRouterService;
+    export type IUiViewScrollProvider = angular.ui.IUiViewScrollProvider;
+    export type IType = angular.ui.IType;
+}
+
+declare namespace angular.ui {
+
+    interface IState {
+        name?: string;
+        /**
+         * String HTML content, or function that returns an HTML string
+         */
+        template?: string | {(params: IStateParamsService): string};
+        /**
+         * String URL path to template file OR Function, returns URL path string
+         */
+        templateUrl?: string | {(params: IStateParamsService): string};
+        /**
+         * Function, returns HTML content string
+         */
+        templateProvider?: Function | Array<string|Function>;
+        /**
+         * String, component name
+         */
+        component?: string;
+        /**
+         * A controller paired to the state. Function, annotated array or name as String
+         */
+        controller?: Function|string|Array<string|Function>;
+        controllerAs?: string;
+        /**
+         * Function (injectable), returns the actual controller function or string.
+         */
+        controllerProvider?: Function|Array<string|Function>;
+
+        /**
+         * Specifies the parent state of this state
+         */
+        parent?: string | IState;
+
+
+        resolve?: { [name:string]: any };
+        /**
+         * A url with optional parameters. When a state is navigated or transitioned to, the $stateParams service will be populated with any parameters that were passed.
+         */
+        url?: string | IUrlMatcher;
+        /**
+         * A map which optionally configures parameters declared in the url, or defines additional non-url parameters. Only use this within a state if you are not using url. Otherwise you can specify your parameters within the url. When a state is navigated or transitioned to, the $stateParams service will be populated with any parameters that were passed.
+         */
+        params?: any;
+        /**
+         * Use the views property to set up multiple views. If you don't need multiple views within a single state this property is not needed. Tip: remember that often nested views are more useful and powerful than multiple sibling views.
+         */
+        views?: { [name:string]: IState };
+        abstract?: boolean;
+        /**
+         * Callback function for when a state is entered. Good way to trigger an action or dispatch an event, such as opening a dialog.
+         * If minifying your scripts, make sure to explicitly annotate this function, because it won't be automatically annotated by your build tools.
+         */
+        onEnter?: Function|Array<string|Function>;
+        /**
+         * Callback functions for when a state is entered and exited. Good way to trigger an action or dispatch an event, such as opening a dialog.
+         * If minifying your scripts, make sure to explicitly annotate this function, because it won't be automatically annotated by your build tools.
+         */
+        onExit?: Function|Array<string|Function>;
+        /**
+         * Arbitrary data object, useful for custom configuration.
+         */
+        data?: any;
+
+        /**
+         * Boolean (default true). If false will not re-trigger the same state just because a search/query parameter has changed. Useful for when you'd like to modify $location.search() without triggering a reload.
+         */
+        reloadOnSearch?: boolean;
+
+        /**
+         * Boolean (default true). If false will reload state on everytransitions. Useful for when you'd like to restore all data  to its initial state.
+         */
+        cache?: boolean;
+    }
+
+    interface IUnfoundState {
+        to: string,
+        toParams: {},
+        options: IStateOptions
+    }
+    
+    interface IStateProvider extends angular.IServiceProvider {
+        state(name:string, config:IState): IStateProvider;
+        state(config:IState): IStateProvider;
+        decorator(name?: string, decorator?: (state: IState, parent: Function) => any): any;
+    }
+
+    interface IUrlMatcher {
+        concat(pattern: string): IUrlMatcher;
+        exec(path: string, searchParams: {}): {};
+        parameters(): string[];
+        format(values: {}): string;
+    }
+
+    interface IUrlMatcherFactory {
+        /**
+         * Creates a UrlMatcher for the specified pattern.
+         *
+         * @param pattern {string} The URL pattern.
+         *
+         * @returns {IUrlMatcher} The UrlMatcher.
+         */
+        compile(pattern: string): IUrlMatcher;
+        /**
+         * Returns true if the specified object is a UrlMatcher, or false otherwise.
+         *
+         * @param o {any} The object to perform the type check against.
+         *
+         * @returns {boolean} Returns true if the object matches the IUrlMatcher interface, by implementing all the same methods.
+         */
+        isMatcher(o: any): boolean;
+        /**
+         * Returns a type definition for the specified name
+         *
+         * @param name {string} The type definition name
+         *
+         * @returns {IType} The type definition
+         */
+        type(name: string): IType;
+        /**
+         * Registers a custom Type object that can be used to generate URLs with typed parameters.
+         *
+         * @param {IType} definition The type definition.
+         * @param {any[]} inlineAnnotedDefinitionFn A function that is injected before the app runtime starts. The result of this function is merged into the existing definition.
+         *
+         * @returns {IUrlMatcherFactory} Returns $urlMatcherFactoryProvider.
+         */
+        type(name: string, definition: IType, inlineAnnotedDefinitionFn?: any[]): IUrlMatcherFactory;
+        /**
+         * Registers a custom Type object that can be used to generate URLs with typed parameters.
+         *
+         * @param {IType} definition The type definition.
+         * @param {any[]} inlineAnnotedDefinitionFn A function that is injected before the app runtime starts. The result of this function is merged into the existing definition.
+         *
+         * @returns {IUrlMatcherFactory} Returns $urlMatcherFactoryProvider.
+         */
+        type(name: string, definition: IType, definitionFn?: (...args:any[]) => IType): IUrlMatcherFactory;
+        /**
+         * Defines whether URL matching should be case sensitive (the default behavior), or not.
+         *
+         * @param value {boolean} false to match URL in a case sensitive manner; otherwise true;
+         *
+         * @returns {boolean} the current value of caseInsensitive
+         */
+        caseInsensitive(value?: boolean): boolean;
+        /**
+         * Sets the default behavior when generating or matching URLs with default parameter values
+         *
+         * @param value {string} A string that defines the default parameter URL squashing behavior. nosquash: When generating an href with a default parameter value, do not squash the parameter value from the URL slash: When generating an href with a default parameter value, squash (remove) the parameter value, and, if the parameter is surrounded by slashes, squash (remove) one slash from the URL any other string, e.g. "~": When generating an href with a default parameter value, squash (remove) the parameter value from the URL and replace it with this string.
+         */
+        defaultSquashPolicy(value: string): void;
+        /**
+         * Defines whether URLs should match trailing slashes, or not (the default behavior).
+         *
+         * @param value {boolean} false to match trailing slashes in URLs, otherwise true.
+         *
+         * @returns {boolean} the current value of strictMode
+         */
+        strictMode(value?: boolean): boolean;
+    }
+
+    interface IUrlRouterProvider extends angular.IServiceProvider {
+        when(whenPath: RegExp, handler: Function): IUrlRouterProvider;
+        when(whenPath: RegExp, handler: any[]): IUrlRouterProvider;
+        when(whenPath: RegExp, toPath: string): IUrlRouterProvider;
+        when(whenPath: IUrlMatcher, hanlder: Function): IUrlRouterProvider;
+        when(whenPath: IUrlMatcher, handler: any[]): IUrlRouterProvider;
+        when(whenPath: IUrlMatcher, toPath: string): IUrlRouterProvider;
+        when(whenPath: string, handler: Function): IUrlRouterProvider;
+        when(whenPath: string, handler: any[]): IUrlRouterProvider;
+        when(whenPath: string, toPath: string): IUrlRouterProvider;
+        otherwise(handler: Function): IUrlRouterProvider;
+        otherwise(handler: any[]): IUrlRouterProvider;
+        otherwise(path: string): IUrlRouterProvider;
+        rule(handler: Function): IUrlRouterProvider;
+        rule(handler: any[]): IUrlRouterProvider;
+        /**
+         * Disables (or enables) deferring location change interception.
+         *
+         * If you wish to customize the behavior of syncing the URL (for example, if you wish to defer a transition but maintain the current URL), call this method at configuration time. Then, at run time, call $urlRouter.listen() after you have configured your own $locationChangeSuccess event handler.
+         *
+         * @param {boolean} defer Indicates whether to defer location change interception. Passing no parameter is equivalent to true.
+         */
+        deferIntercept(defer?: boolean): void;
+    }
+
+    interface IStateOptions {
+        /**
+         * {boolean=true|string=} - If true will update the url in the location bar, if false will not. If string, must be "replace", which will update url and also replace last history record.
+         */
+        location?: boolean | string;
+        /**
+         *  {boolean=true}, If true will inherit url parameters from current url.
+         */
+        inherit?: boolean;
+        /**
+         * {object=$state.$current}, When transitioning with relative path (e.g '^'), defines which state to be relative from.
+         */
+        relative?: IState;
+        /**
+         * {boolean=true}, If true will broadcast $stateChangeStart and $stateChangeSuccess events.
+         */
+        notify?: boolean;
+        /**
+         * {boolean=false|string|IState}, If true will force transition even if the state or params have not changed, aka a reload of the same state. It differs from reloadOnSearch because you'd use this when you want to force a reload when everything is the same, including search params.
+         */
+        reload?: boolean | string | IState;
+    }
+
+    interface IHrefOptions {
+        lossy?: boolean;
+        inherit?: boolean;
+        relative?: IState;
+        absolute?: boolean;
+    }
+
+    interface IStateService {
+        /**
+         * Convenience method for transitioning to a new state. $state.go calls $state.transitionTo internally but automatically sets options to { location: true, inherit: true, relative: $state.$current, notify: true }. This allows you to easily use an absolute or relative to path and specify only the parameters you'd like to update (while letting unspecified parameters inherit from the currently active ancestor states).
+         *
+         * @param to Absolute state name or relative state path. Some examples:
+         *
+         * $state.go('contact.detail') - will go to the contact.detail state
+         * $state.go('^') - will go to a parent state
+         * $state.go('^.sibling') - will go to a sibling state
+         * $state.go('.child.grandchild') - will go to grandchild state
+         *
+         * @param params A map of the parameters that will be sent to the state, will populate $stateParams. Any parameters that are not specified will be inherited from currently defined parameters. This allows, for example, going to a sibling state that shares parameters specified in a parent state. Parameter inheritance only works between common ancestor states, I.e. transitioning to a sibling will get you the parameters for all parents, transitioning to a child will get you all current parameters, etc.
+         *
+         * @param options Options object.
+         */
+        go(to: string, params?: {}, options?: IStateOptions): angular.IPromise<any>;
+        go(to: IState, params?: {}, options?: IStateOptions): angular.IPromise<any>;
+        transitionTo(state: string, params?: {}, updateLocation?: boolean): angular.IPromise<any>;
+        transitionTo(state: IState, params?: {}, updateLocation?: boolean): angular.IPromise<any>;
+        transitionTo(state: string, params?: {}, options?: IStateOptions): angular.IPromise<any>;
+        transitionTo(state: IState, params?: {}, options?: IStateOptions): angular.IPromise<any>;
+        includes(state: string, params?: {}): boolean;
+        includes(state: string, params?: {}, options?:any): boolean;
+        is(state:string, params?: {}): boolean;
+        is(state: IState, params?: {}): boolean;
+        href(state: IState, params?: {}, options?: IHrefOptions): string;
+        href(state: string, params?: {}, options?: IHrefOptions): string;
+        get(state: string, context?: string): IState;
+        get(state: IState, context?: string): IState;
+        get(state: string, context?: IState): IState;
+        get(state: IState, context?: IState): IState;
+        get(): IState[];
+        /** A reference to the state's config object. However you passed it in. Useful for accessing custom data. */
+        current: IState;
+        /** A param object, e.g. {sectionId: section.id)}, that you'd like to test against the current active state. */
+        params: IStateParamsService;
+        reload(): angular.IPromise<any>;
+
+        /** Currently pending transition. A promise that'll resolve or reject. */
+        transition: angular.IPromise<{}>;
+
+        $current: IResolvedState;
+    }
+
+    interface IResolvedState {
+        locals: {
+            /**
+             * Currently resolved "resolve" values from the current state
+             */
+            globals: { [key: string]: any; };
+        };
+    }
+
+    interface IStateParamsService {
+        [key: string]: any;
+    }
+
+    interface IUrlRouterService {
+    	/*
+    	 * Triggers an update; the same update that happens when the address bar
+    	 * url changes, aka $locationChangeSuccess.
+    	 *
+    	 * This method is useful when you need to use preventDefault() on the
+    	 * $locationChangeSuccess event, perform some custom logic (route protection,
+    	 * auth, config, redirection, etc) and then finally proceed with the transition
+    	 * by calling $urlRouter.sync().
+    	 *
+    	 */
+        sync(): void;
+        listen(): Function;
+        href(urlMatcher: IUrlMatcher, params?: IStateParamsService, options?: IHrefOptions): string;
+        update(read?: boolean): void;
+        push(urlMatcher: IUrlMatcher, params?: IStateParamsService, options?: IHrefOptions): void;
+    }
+
+    interface IUiViewScrollProvider {
+        /*
+         * Reverts back to using the core $anchorScroll service for scrolling
+         * based on the url anchor.
+         */
+        useAnchorScroll(): void;
+    }
+
+    interface IType {
+        /**
+         * Converts a parameter value (from URL string or transition param) to a custom/native value.
+         *
+         * @param val {string} The URL parameter value to decode.
+         * @param key {string} The name of the parameter in which val is stored. Can be used for meta-programming of Type objects.
+         *
+         * @returns {any} Returns a custom representation of the URL parameter value.
+         */
+        decode(val: string, key: string): any;
+        /**
+         * Encodes a custom/native type value to a string that can be embedded in a URL. Note that the return value does not need to be URL-safe (i.e. passed through encodeURIComponent()), it only needs to be a representation of val that has been coerced to a string.
+         *
+         * @param val {any} The value to encode.
+         * @param key {string} The name of the parameter in which val is stored. Can be used for meta-programming of Type objects.
+         *
+         * @returns {string} Returns a string representation of val that can be encoded in a URL.
+         */
+        encode(val: any, key: string): string;
+        /**
+         * Determines whether two decoded values are equivalent.
+         *
+         * @param a {any} A value to compare against.
+         * @param b {any} A value to compare against.
+         *
+         * @returns {boolean} Returns true if the values are equivalent/equal, otherwise false.
+         */
+        equals? (a: any, b: any): boolean;
+        /**
+         * Detects whether a value is of a particular type. Accepts a native (decoded) value and determines whether it matches the current Type object.
+         *
+         * @param val {any} The value to check.
+         * @param key {any} Optional. If the type check is happening in the context of a specific UrlMatcher object, this is the name of the parameter in which val is stored. Can be used for meta-programming of Type objects.
+         *
+         * @returns {boolean} Returns true if the value matches the type, otherwise false.
+         */
+        is(val: any, key: string): boolean;
+        /**
+         * The regular expression pattern used to match values of this type when coming from a substring of a URL.
+         */
+        pattern?: RegExp;
+    }
+}
diff --git a/typings/globals/angular-ui-router/typings.json b/typings/globals/angular-ui-router/typings.json
new file mode 100644
index 0000000..13e0275
--- /dev/null
+++ b/typings/globals/angular-ui-router/typings.json
@@ -0,0 +1,8 @@
+{
+  "resolution": "main",
+  "tree": {
+    "src": "https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/b38cd68fe2dacaea0bb4efd6a3c638ceeae4fb25/angular-ui-router/angular-ui-router.d.ts",
+    "raw": "registry:dt/angular-ui-router#1.1.5+20160707113237",
+    "typings": "https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/b38cd68fe2dacaea0bb4efd6a3c638ceeae4fb25/angular-ui-router/angular-ui-router.d.ts"
+  }
+}
diff --git a/typings/globals/angular/index.d.ts b/typings/globals/angular/index.d.ts
new file mode 100644
index 0000000..edb1d69
--- /dev/null
+++ b/typings/globals/angular/index.d.ts
@@ -0,0 +1,1984 @@
+// Generated by typings
+// Source: https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/5f2450ba8001ed38c83eae3c0db93f0a3309180d/angularjs/angular.d.ts
+declare var angular: angular.IAngularStatic;
+
+// Support for painless dependency injection
+interface Function {
+    $inject?: string[];
+}
+
+// Collapse angular into ng
+import ng = angular;
+// Support AMD require
+declare module 'angular' {
+    export = angular;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+// ng module (angular.js)
+///////////////////////////////////////////////////////////////////////////////
+declare namespace angular {
+
+    type Injectable<T extends Function> = T | (string | T)[];
+
+    // not directly implemented, but ensures that constructed class implements $get
+    interface IServiceProviderClass {
+        new (...args: any[]): IServiceProvider;
+    }
+
+    interface IServiceProviderFactory {
+        (...args: any[]): IServiceProvider;
+    }
+
+    // All service providers extend this interface
+    interface IServiceProvider {
+        $get: any;
+    }
+
+    interface IAngularBootstrapConfig {
+        strictDi?: boolean;
+    }
+
+    ///////////////////////////////////////////////////////////////////////////
+    // AngularStatic
+    // see http://docs.angularjs.org/api
+    ///////////////////////////////////////////////////////////////////////////
+    interface IAngularStatic {
+        bind(context: any, fn: Function, ...args: any[]): Function;
+
+        /**
+         * Use this function to manually start up angular application.
+         *
+         * @param element DOM element which is the root of angular application.
+         * @param modules An array of modules to load into the application.
+         *     Each item in the array should be the name of a predefined module or a (DI annotated)
+         *     function that will be invoked by the injector as a config block.
+         * @param config an object for defining configuration options for the application. The following keys are supported:
+         *     - `strictDi`: disable automatic function annotation for the application. This is meant to assist in finding bugs which break minified code.
+         */
+        bootstrap(element: string|Element|JQuery|Document, modules?: (string|Function|any[])[], config?: IAngularBootstrapConfig): auto.IInjectorService;
+
+        /**
+         * Creates a deep copy of source, which should be an object or an array.
+         *
+         * - If no destination is supplied, a copy of the object or array is created.
+         * - If a destination is provided, all of its elements (for array) or properties (for objects) are deleted and then all elements/properties from the source are copied to it.
+         * - If source is not an object or array (inc. null and undefined), source is returned.
+         * - If source is identical to 'destination' an exception will be thrown.
+         *
+         * @param source The source that will be used to make a copy. Can be any type, including primitives, null, and undefined.
+         * @param destination Destination into which the source is copied. If provided, must be of the same type as source.
+         */
+        copy<T>(source: T, destination?: T): T;
+
+        /**
+         * Wraps a raw DOM element or HTML string as a jQuery element.
+         *
+         * If jQuery is available, angular.element is an alias for the jQuery function. If jQuery is not available, angular.element delegates to Angular's built-in subset of jQuery, called "jQuery lite" or "jqLite."
+         */
+        element: JQueryStatic;
+        equals(value1: any, value2: any): boolean;
+        extend(destination: any, ...sources: any[]): any;
+
+        /**
+         * Invokes the iterator function once for each item in obj collection, which can be either an object or an array. The iterator function is invoked with iterator(value, key), where value is the value of an object property or an array element and key is the object property key or array element index. Specifying a context for the function is optional.
+         *
+         * It is worth noting that .forEach does not iterate over inherited properties because it filters using the hasOwnProperty method.
+         *
+         * @param obj Object to iterate over.
+         * @param iterator Iterator function.
+         * @param context Object to become context (this) for the iterator function.
+         */
+        forEach<T>(obj: T[], iterator: (value: T, key: number) => any, context?: any): any;
+        /**
+         * Invokes the iterator function once for each item in obj collection, which can be either an object or an array. The iterator function is invoked with iterator(value, key), where value is the value of an object property or an array element and key is the object property key or array element index. Specifying a context for the function is optional.
+         *
+         * It is worth noting that .forEach does not iterate over inherited properties because it filters using the hasOwnProperty method.
+         *
+         * @param obj Object to iterate over.
+         * @param iterator Iterator function.
+         * @param context Object to become context (this) for the iterator function.
+         */
+        forEach<T>(obj: { [index: string]: T; }, iterator: (value: T, key: string) => any, context?: any): any;
+        /**
+         * Invokes the iterator function once for each item in obj collection, which can be either an object or an array. The iterator function is invoked with iterator(value, key), where value is the value of an object property or an array element and key is the object property key or array element index. Specifying a context for the function is optional.
+         *
+         * It is worth noting that .forEach does not iterate over inherited properties because it filters using the hasOwnProperty method.
+         *
+         * @param obj Object to iterate over.
+         * @param iterator Iterator function.
+         * @param context Object to become context (this) for the iterator function.
+         */
+        forEach(obj: any, iterator: (value: any, key: any) => any, context?: any): any;
+
+        fromJson(json: string): any;
+        identity<T>(arg?: T): T;
+        injector(modules?: any[], strictDi?: boolean): auto.IInjectorService;
+        isArray(value: any): value is Array<any>;
+        isDate(value: any): value is Date;
+        isDefined(value: any): boolean;
+        isElement(value: any): boolean;
+        isFunction(value: any): value is Function;
+        isNumber(value: any): value is number;
+        isObject(value: any): value is Object;
+        isObject<T>(value: any): value is T;
+        isString(value: any): value is string;
+        isUndefined(value: any): boolean;
+        lowercase(str: string): string;
+
+        /**
+         * Deeply extends the destination object dst by copying own enumerable properties from the src object(s) to dst. You can specify multiple src objects. If you want to preserve original objects, you can do so by passing an empty object as the target: var object = angular.merge({}, object1, object2).
+         *
+         * Unlike extend(), merge() recursively descends into object properties of source objects, performing a deep copy.
+         *
+         * @param dst Destination object.
+         * @param src Source object(s).
+         */
+        merge(dst: any, ...src: any[]): any;
+
+        /**
+         * The angular.module is a global place for creating, registering and retrieving Angular modules. All modules (angular core or 3rd party) that should be available to an application must be registered using this mechanism.
+         *
+         * When passed two or more arguments, a new module is created. If passed only one argument, an existing module (the name passed as the first argument to module) is retrieved.
+         *
+         * @param name The name of the module to create or retrieve.
+         * @param requires The names of modules this module depends on. If specified then new module is being created. If unspecified then the module is being retrieved for further configuration.
+         * @param configFn Optional configuration function for the module.
+         */
+        module(
+            name: string,
+            requires?: string[],
+            configFn?: Function): IModule;
+
+        noop(...args: any[]): void;
+        reloadWithDebugInfo(): void;
+        toJson(obj: any, pretty?: boolean | number): string;
+        uppercase(str: string): string;
+        version: {
+            full: string;
+            major: number;
+            minor: number;
+            dot: number;
+            codeName: string;
+        };
+
+        /**
+         * If window.name contains prefix NG_DEFER_BOOTSTRAP! when angular.bootstrap is called, the bootstrap process will be paused until angular.resumeBootstrap() is called.
+         * @param extraModules An optional array of modules that should be added to the original list of modules that the app was about to be bootstrapped with.
+         */
+        resumeBootstrap?(extraModules?: string[]): ng.auto.IInjectorService;
+    }
+
+    ///////////////////////////////////////////////////////////////////////////
+    // Module
+    // see http://docs.angularjs.org/api/angular.Module
+    ///////////////////////////////////////////////////////////////////////////
+    interface IModule {
+        /**
+         * Use this method to register a component.
+         *
+         * @param name The name of the component.
+         * @param options A definition object passed into the component.
+         */
+        component(name: string, options: IComponentOptions): IModule;
+        /**
+         * Use this method to register work which needs to be performed on module loading.
+         *
+         * @param configFn Execute this function on module load. Useful for service configuration.
+         */
+        config(configFn: Function): IModule;
+        /**
+         * Use this method to register work which needs to be performed on module loading.
+         *
+         * @param inlineAnnotatedFunction Execute this function on module load. Useful for service configuration.
+         */
+        config(inlineAnnotatedFunction: any[]): IModule;
+        config(object: Object): IModule;
+        /**
+         * Register a constant service, such as a string, a number, an array, an object or a function, with the $injector. Unlike value it can be injected into a module configuration function (see config) and it cannot be overridden by an Angular decorator.
+         *
+         * @param name The name of the constant.
+         * @param value The constant value.
+         */
+        constant<T>(name: string, value: T): IModule;
+        constant(object: Object): IModule;
+        /**
+         * The $controller service is used by Angular to create new controllers.
+         *
+         * This provider allows controller registration via the register method.
+         *
+         * @param name Controller name, or an object map of controllers where the keys are the names and the values are the constructors.
+         * @param controllerConstructor Controller constructor fn (optionally decorated with DI annotations in the array notation).
+         */
+        controller(name: string, controllerConstructor: Injectable<IControllerConstructor>): IModule;
+        controller(object: {[name: string]: Injectable<IControllerConstructor>}): IModule;
+        /**
+         * Register a new directive with the compiler.
+         *
+         * @param name Name of the directive in camel-case (i.e. ngBind which will match as ng-bind)
+         * @param directiveFactory An injectable directive factory function.
+         */
+        directive(name: string, directiveFactory: Injectable<IDirectiveFactory>): IModule;
+        directive(object: {[directiveName: string]: Injectable<IDirectiveFactory>}): IModule;
+        /**
+         * Register a service factory, which will be called to return the service instance. This is short for registering a service where its provider consists of only a $get property, which is the given service factory function. You should use $provide.factory(getFn) if you do not need to configure your service in a provider.
+         *
+         * @param name The name of the instance.
+         * @param $getFn The $getFn for the instance creation. Internally this is a short hand for $provide.provider(name, {$get: $getFn}).
+         */
+        factory(name: string, $getFn: Injectable<Function>): IModule;
+        factory(object: {[name: string]: Injectable<Function>}): IModule;
+        filter(name: string, filterFactoryFunction: Injectable<Function>): IModule;
+        filter(object: {[name: string]: Injectable<Function>}): IModule;
+        provider(name: string, serviceProviderFactory: IServiceProviderFactory): IModule;
+        provider(name: string, serviceProviderConstructor: IServiceProviderClass): IModule;
+        provider(name: string, inlineAnnotatedConstructor: any[]): IModule;
+        provider(name: string, providerObject: IServiceProvider): IModule;
+        provider(object: Object): IModule;
+        /**
+         * Run blocks are the closest thing in Angular to the main method. A run block is the code which needs to run to kickstart the application. It is executed after all of the service have been configured and the injector has been created. Run blocks typically contain code which is hard to unit-test, and for this reason should be declared in isolated modules, so that they can be ignored in the unit-tests.
+         */
+        run(initializationFunction: Injectable<Function>): IModule;
+        /**
+         * Register a service constructor, which will be invoked with new to create the service instance. This is short for registering a service where its provider's $get property is a factory function that returns an instance instantiated by the injector from the service constructor function.
+         *
+         * @param name The name of the instance.
+         * @param serviceConstructor An injectable class (constructor function) that will be instantiated.
+         */
+        service(name: string, serviceConstructor: Injectable<Function>): IModule;
+        service(object: {[name: string]: Injectable<Function>}): IModule;
+        /**
+         * Register a value service with the $injector, such as a string, a number, an array, an object or a function. This is short for registering a service where its provider's $get property is a factory function that takes no arguments and returns the value service.
+
+           Value services are similar to constant services, except that they cannot be injected into a module configuration function (see config) but they can be overridden by an Angular decorator.
+         *
+         * @param name The name of the instance.
+         * @param value The value.
+         */
+        value<T>(name: string, value: T): IModule;
+        value(object: Object): IModule;
+
+        /**
+         * Register a service decorator with the $injector. A service decorator intercepts the creation of a service, allowing it to override or modify the behaviour of the service. The object returned by the decorator may be the original service, or a new service object which replaces or wraps and delegates to the original service.
+         * @param name The name of the service to decorate
+         * @param decorator This function will be invoked when the service needs to be instantiated and should return the decorated service instance. The function is called using the injector.invoke method and is therefore fully injectable. Local injection arguments: $delegate - The original service instance, which can be monkey patched, configured, decorated or delegated to.
+         */
+        decorator(name: string, decorator: Injectable<Function>): IModule;
+
+        // Properties
+        name: string;
+        requires: string[];
+    }
+
+    ///////////////////////////////////////////////////////////////////////////
+    // Attributes
+    // see http://docs.angularjs.org/api/ng.$compile.directive.Attributes
+    ///////////////////////////////////////////////////////////////////////////
+    interface IAttributes {
+        /**
+         * this is necessary to be able to access the scoped attributes. it's not very elegant
+         * because you have to use attrs['foo'] instead of attrs.foo but I don't know of a better way
+         * this should really be limited to return string but it creates this problem: http://stackoverflow.com/q/17201854/165656
+         */
+        [name: string]: any;
+
+        /**
+         * Converts an attribute name (e.g. dash/colon/underscore-delimited string, optionally prefixed with x- or data-) to its normalized, camelCase form.
+         *
+         * Also there is special case for Moz prefix starting with upper case letter.
+         *
+         * For further information check out the guide on @see https://docs.angularjs.org/guide/directive#matching-directives
+         */
+        $normalize(name: string): string;
+
+        /**
+         * Adds the CSS class value specified by the classVal parameter to the
+         * element. If animations are enabled then an animation will be triggered
+         * for the class addition.
+         */
+        $addClass(classVal: string): void;
+
+        /**
+         * Removes the CSS class value specified by the classVal parameter from the
+         * element. If animations are enabled then an animation will be triggered for
+         * the class removal.
+         */
+        $removeClass(classVal: string): void;
+
+        /**
+         * Adds and removes the appropriate CSS class values to the element based on the difference between
+         * the new and old CSS class values (specified as newClasses and oldClasses).
+         */
+        $updateClass(newClasses: string, oldClasses: string): void;
+
+        /**
+         * Set DOM element attribute value.
+         */
+        $set(key: string, value: any): void;
+
+        /**
+         * Observes an interpolated attribute.
+         * The observer function will be invoked once during the next $digest
+         * following compilation. The observer is then invoked whenever the
+         * interpolated value changes.
+         */
+        $observe<T>(name: string, fn: (value?: T) => any): Function;
+
+        /**
+         * A map of DOM element attribute names to the normalized name. This is needed
+         * to do reverse lookup from normalized name back to actual name.
+         */
+        $attr: Object;
+    }
+
+    /**
+     * form.FormController - type in module ng
+     * see https://docs.angularjs.org/api/ng/type/form.FormController
+     */
+    interface IFormController {
+
+        /**
+         * Indexer which should return ng.INgModelController for most properties but cannot because of "All named properties must be assignable to string indexer type" constraint - see https://github.com/Microsoft/TypeScript/issues/272
+         */
+        [name: string]: any;
+
+        $pristine: boolean;
+        $dirty: boolean;
+        $valid: boolean;
+        $invalid: boolean;
+        $submitted: boolean;
+        $error: any;
+        $name: string;
+        $pending: any;
+        $addControl(control: INgModelController | IFormController): void;
+        $removeControl(control: INgModelController | IFormController): void;
+        $setValidity(validationErrorKey: string, isValid: boolean, control: INgModelController | IFormController): void;
+        $setDirty(): void;
+        $setPristine(): void;
+        $commitViewValue(): void;
+        $rollbackViewValue(): void;
+        $setSubmitted(): void;
+        $setUntouched(): void;
+    }
+
+    ///////////////////////////////////////////////////////////////////////////
+    // NgModelController
+    // see http://docs.angularjs.org/api/ng.directive:ngModel.NgModelController
+    ///////////////////////////////////////////////////////////////////////////
+    interface INgModelController {
+        $render(): void;
+        $setValidity(validationErrorKey: string, isValid: boolean): void;
+        // Documentation states viewValue and modelValue to be a string but other
+        // types do work and it's common to use them.
+        $setViewValue(value: any, trigger?: string): void;
+        $setPristine(): void;
+        $setDirty(): void;
+        $validate(): void;
+        $setTouched(): void;
+        $setUntouched(): void;
+        $rollbackViewValue(): void;
+        $commitViewValue(): void;
+        $isEmpty(value: any): boolean;
+
+        $viewValue: any;
+
+        $modelValue: any;
+
+        $parsers: IModelParser[];
+        $formatters: IModelFormatter[];
+        $viewChangeListeners: IModelViewChangeListener[];
+        $error: any;
+        $name: string;
+
+        $touched: boolean;
+        $untouched: boolean;
+
+        $validators: IModelValidators;
+        $asyncValidators: IAsyncModelValidators;
+
+        $pending: any;
+        $pristine: boolean;
+        $dirty: boolean;
+        $valid: boolean;
+        $invalid: boolean;
+    }
+
+    //Allows tuning how model updates are done.
+    //https://docs.angularjs.org/api/ng/directive/ngModelOptions
+    interface INgModelOptions {
+        updateOn?: string;
+        debounce?: any;
+        allowInvalid?: boolean;
+        getterSetter?: boolean;
+        timezone?: string;
+    }
+
+    interface IModelValidators {
+        /**
+         * viewValue is any because it can be an object that is called in the view like $viewValue.name:$viewValue.subName
+         */
+        [index: string]: (modelValue: any, viewValue: any) => boolean;
+    }
+
+    interface IAsyncModelValidators {
+        [index: string]: (modelValue: any, viewValue: any) => IPromise<any>;
+    }
+
+    interface IModelParser {
+        (value: any): any;
+    }
+
+    interface IModelFormatter {
+        (value: any): any;
+    }
+
+    interface IModelViewChangeListener {
+        (): void;
+    }
+
+    /**
+     * $rootScope - $rootScopeProvider - service in module ng
+     * see https://docs.angularjs.org/api/ng/type/$rootScope.Scope and https://docs.angularjs.org/api/ng/service/$rootScope
+     */
+    interface IRootScopeService {
+        [index: string]: any;
+
+        $apply(): any;
+        $apply(exp: string): any;
+        $apply(exp: (scope: IScope) => any): any;
+
+        $applyAsync(): any;
+        $applyAsync(exp: string): any;
+        $applyAsync(exp: (scope: IScope) => any): any;
+
+        /**
+         * Dispatches an event name downwards to all child scopes (and their children) notifying the registered $rootScope.Scope listeners.
+         *
+         * The event life cycle starts at the scope on which $broadcast was called. All listeners listening for name event on this scope get notified. Afterwards, the event propagates to all direct and indirect scopes of the current scope and calls all registered listeners along the way. The event cannot be canceled.
+         *
+         * Any exception emitted from the listeners will be passed onto the $exceptionHandler service.
+         *
+         * @param name Event name to broadcast.
+         * @param args Optional one or more arguments which will be passed onto the event listeners.
+         */
+        $broadcast(name: string, ...args: any[]): IAngularEvent;
+        $destroy(): void;
+        $digest(): void;
+        /**
+         * Dispatches an event name upwards through the scope hierarchy notifying the registered $rootScope.Scope listeners.
+         *
+         * The event life cycle starts at the scope on which $emit was called. All listeners listening for name event on this scope get notified. Afterwards, the event traverses upwards toward the root scope and calls all registered listeners along the way. The event will stop propagating if one of the listeners cancels it.
+         *
+         * Any exception emitted from the listeners will be passed onto the $exceptionHandler service.
+         *
+         * @param name Event name to emit.
+         * @param args Optional one or more arguments which will be passed onto the event listeners.
+         */
+        $emit(name: string, ...args: any[]): IAngularEvent;
+
+        $eval(): any;
+        $eval(expression: string, locals?: Object): any;
+        $eval(expression: (scope: IScope) => any, locals?: Object): any;
+
+        $evalAsync(): void;
+        $evalAsync(expression: string): void;
+        $evalAsync(expression: (scope: IScope) => any): void;
+
+        // Defaults to false by the implementation checking strategy
+        $new(isolate?: boolean, parent?: IScope): IScope;
+
+        /**
+         * Listens on events of a given type. See $emit for discussion of event life cycle.
+         *
+         * The event listener function format is: function(event, args...).
+         *
+         * @param name Event name to listen on.
+         * @param listener Function to call when the event is emitted.
+         */
+        $on(name: string, listener: (event: IAngularEvent, ...args: any[]) => any): () => void;
+
+        $watch(watchExpression: string, listener?: string, objectEquality?: boolean): () => void;
+        $watch<T>(watchExpression: string, listener?: (newValue: T, oldValue: T, scope: IScope) => any, objectEquality?: boolean): () => void;
+        $watch(watchExpression: (scope: IScope) => any, listener?: string, objectEquality?: boolean): () => void;
+        $watch<T>(watchExpression: (scope: IScope) => T, listener?: (newValue: T, oldValue: T, scope: IScope) => any, objectEquality?: boolean): () => void;
+
+        $watchCollection<T>(watchExpression: string, listener: (newValue: T, oldValue: T, scope: IScope) => any): () => void;
+        $watchCollection<T>(watchExpression: (scope: IScope) => T, listener: (newValue: T, oldValue: T, scope: IScope) => any): () => void;
+
+        $watchGroup(watchExpressions: any[], listener: (newValue: any, oldValue: any, scope: IScope) => any): () => void;
+        $watchGroup(watchExpressions: { (scope: IScope): any }[], listener: (newValue: any, oldValue: any, scope: IScope) => any): () => void;
+
+        $parent: IScope;
+        $root: IRootScopeService;
+        $id: number;
+
+        // Hidden members
+        $$isolateBindings: any;
+        $$phase: any;
+    }
+
+    interface IScope extends IRootScopeService { }
+
+    /**
+     * $scope for ngRepeat directive.
+     * see https://docs.angularjs.org/api/ng/directive/ngRepeat
+     */
+    interface IRepeatScope extends IScope {
+
+        /**
+         * iterator offset of the repeated element (0..length-1).
+         */
+        $index: number;
+
+        /**
+         * true if the repeated element is first in the iterator.
+         */
+        $first: boolean;
+
+        /**
+         * true if the repeated element is between the first and last in the iterator.
+         */
+        $middle: boolean;
+
+        /**
+         * true if the repeated element is last in the iterator.
+         */
+        $last: boolean;
+
+        /**
+         * true if the iterator position $index is even (otherwise false).
+         */
+        $even: boolean;
+
+        /**
+         * true if the iterator position $index is odd (otherwise false).
+         */
+        $odd: boolean;
+
+    }
+
+    interface IAngularEvent {
+        /**
+         * the scope on which the event was $emit-ed or $broadcast-ed.
+         */
+        targetScope: IScope;
+        /**
+         * the scope that is currently handling the event. Once the event propagates through the scope hierarchy, this property is set to null.
+         */
+        currentScope: IScope;
+        /**
+         * name of the event.
+         */
+        name: string;
+        /**
+         * calling stopPropagation function will cancel further event propagation (available only for events that were $emit-ed).
+         */
+        stopPropagation?(): void;
+        /**
+         * calling preventDefault sets defaultPrevented flag to true.
+         */
+        preventDefault(): void;
+        /**
+         * true if preventDefault was called.
+         */
+        defaultPrevented: boolean;
+    }
+
+    ///////////////////////////////////////////////////////////////////////////
+    // WindowService
+    // see http://docs.angularjs.org/api/ng.$window
+    ///////////////////////////////////////////////////////////////////////////
+    interface IWindowService extends Window {
+        [key: string]: any;
+    }
+
+    ///////////////////////////////////////////////////////////////////////////
+    // TimeoutService
+    // see http://docs.angularjs.org/api/ng.$timeout
+    ///////////////////////////////////////////////////////////////////////////
+    interface ITimeoutService {
+        (delay?: number, invokeApply?: boolean): IPromise<void>;
+        <T>(fn: (...args: any[]) => T, delay?: number, invokeApply?: boolean, ...args: any[]): IPromise<T>;
+        cancel(promise?: IPromise<any>): boolean;
+    }
+
+    ///////////////////////////////////////////////////////////////////////////
+    // IntervalService
+    // see http://docs.angularjs.org/api/ng.$interval
+    ///////////////////////////////////////////////////////////////////////////
+    interface IIntervalService {
+        (func: Function, delay: number, count?: number, invokeApply?: boolean, ...args: any[]): IPromise<any>;
+        cancel(promise: IPromise<any>): boolean;
+    }
+
+    /**
+     * $filter - $filterProvider - service in module ng
+     *
+     * Filters are used for formatting data displayed to the user.
+     *
+     * see https://docs.angularjs.org/api/ng/service/$filter
+     */
+    interface IFilterService {
+        (name: 'filter'): IFilterFilter;
+        (name: 'currency'): IFilterCurrency;
+        (name: 'number'): IFilterNumber;
+        (name: 'date'): IFilterDate;
+        (name: 'json'): IFilterJson;
+        (name: 'lowercase'): IFilterLowercase;
+        (name: 'uppercase'): IFilterUppercase;
+        (name: 'limitTo'): IFilterLimitTo;
+        (name: 'orderBy'): IFilterOrderBy;
+        /**
+         * Usage:
+         * $filter(name);
+         *
+         * @param name Name of the filter function to retrieve
+         */
+        <T>(name: string): T;
+    }
+
+    interface IFilterFilter {
+        <T>(array: T[], expression: string | IFilterFilterPatternObject | IFilterFilterPredicateFunc<T>, comparator?: IFilterFilterComparatorFunc<T>|boolean): T[];
+    }
+
+    interface IFilterFilterPatternObject {
+        [name: string]: any;
+    }
+
+    interface IFilterFilterPredicateFunc<T> {
+        (value: T, index: number, array: T[]): boolean;
+    }
+
+    interface IFilterFilterComparatorFunc<T> {
+        (actual: T, expected: T): boolean;
+    }
+
+    interface IFilterCurrency {
+        /**
+         * Formats a number as a currency (ie $1,234.56). When no currency symbol is provided, default symbol for current locale is used.
+         * @param amount Input to filter.
+         * @param symbol Currency symbol or identifier to be displayed.
+         * @param fractionSize Number of decimal places to round the amount to, defaults to default max fraction size for current locale
+         * @return Formatted number
+         */
+        (amount: number, symbol?: string, fractionSize?: number): string;
+    }
+
+    interface IFilterNumber {
+        /**
+         * Formats a number as text.
+         * @param number Number to format.
+         * @param fractionSize Number of decimal places to round the number to. If this is not provided then the fraction size is computed from the current locale's number formatting pattern. In the case of the default locale, it will be 3.
+         * @return Number rounded to decimalPlaces and places a “,” after each third digit.
+         */
+        (value: number|string, fractionSize?: number|string): string;
+    }
+
+    interface IFilterDate {
+        /**
+         * Formats date to a string based on the requested format.
+         *
+         * @param date Date to format either as Date object, milliseconds (string or number) or various ISO 8601 datetime string formats (e.g. yyyy-MM-ddTHH:mm:ss.sssZ and its shorter versions like yyyy-MM-ddTHH:mmZ, yyyy-MM-dd or yyyyMMddTHHmmssZ). If no timezone is specified in the string input, the time is considered to be in the local timezone.
+         * @param format Formatting rules (see Description). If not specified, mediumDate is used.
+         * @param timezone Timezone to be used for formatting. It understands UTC/GMT and the continental US time zone abbreviations, but for general use, use a time zone offset, for example, '+0430' (4 hours, 30 minutes east of the Greenwich meridian) If not specified, the timezone of the browser will be used.
+         * @return Formatted string or the input if input is not recognized as date/millis.
+         */
+        (date: Date | number | string, format?: string, timezone?: string): string;
+    }
+
+    interface IFilterJson {
+        /**
+         * Allows you to convert a JavaScript object into JSON string.
+         * @param object Any JavaScript object (including arrays and primitive types) to filter.
+         * @param spacing The number of spaces to use per indentation, defaults to 2.
+         * @return JSON string.
+         */
+        (object: any, spacing?: number): string;
+    }
+
+    interface IFilterLowercase {
+        /**
+         * Converts string to lowercase.
+         */
+        (value: string): string;
+    }
+
+    interface IFilterUppercase {
+        /**
+         * Converts string to uppercase.
+         */
+        (value: string): string;
+    }
+
+    interface IFilterLimitTo {
+        /**
+         * Creates a new array containing only a specified number of elements. The elements are taken from either the beginning or the end of the source array, string or number, as specified by the value and sign (positive or negative) of limit.
+         * @param input Source array to be limited.
+         * @param limit The length of the returned array. If the limit number is positive, limit number of items from the beginning of the source array/string are copied. If the number is negative, limit number of items from the end of the source array are copied. The limit will be trimmed if it exceeds array.length. If limit is undefined, the input will be returned unchanged.
+         * @param begin Index at which to begin limitation. As a negative index, begin indicates an offset from the end of input. Defaults to 0.
+         * @return A new sub-array of length limit or less if input array had less than limit elements.
+         */
+        <T>(input: T[], limit: string|number, begin?: string|number): T[];
+        /**
+         * Creates a new string containing only a specified number of elements. The elements are taken from either the beginning or the end of the source string or number, as specified by the value and sign (positive or negative) of limit. If a number is used as input, it is converted to a string.
+         * @param input Source string or number to be limited.
+         * @param limit The length of the returned string. If the limit number is positive, limit number of items from the beginning of the source string are copied. If the number is negative, limit number of items from the end of the source string are copied. The limit will be trimmed if it exceeds input.length. If limit is undefined, the input will be returned unchanged.
+         * @param begin Index at which to begin limitation. As a negative index, begin indicates an offset from the end of input. Defaults to 0.
+         * @return A new substring of length limit or less if input had less than limit elements.
+         */
+        (input: string|number, limit: string|number, begin?: string|number): string;
+    }
+
+    interface IFilterOrderBy {
+        /**
+         * Orders a specified array by the expression predicate. It is ordered alphabetically for strings and numerically for numbers. Note: if you notice numbers are not being sorted as expected, make sure they are actually being saved as numbers and not strings.
+         * @param array The array to sort.
+         * @param expression A predicate to be used by the comparator to determine the order of elements.
+         * @param reverse Reverse the order of the array.
+         * @return Reverse the order of the array.
+         */
+        <T>(array: T[], expression: string|((value: T) => any)|(((value: T) => any)|string)[], reverse?: boolean): T[];
+    }
+
+    /**
+     * $filterProvider - $filter - provider in module ng
+     *
+     * Filters are just functions which transform input to an output. However filters need to be Dependency Injected. To achieve this a filter definition consists of a factory function which is annotated with dependencies and is responsible for creating a filter function.
+     *
+     * see https://docs.angularjs.org/api/ng/provider/$filterProvider
+     */
+    interface IFilterProvider extends IServiceProvider {
+        /**
+         * register(name);
+         *
+         * @param name Name of the filter function, or an object map of filters where the keys are the filter names and the values are the filter factories. Note: Filter names must be valid angular Expressions identifiers, such as uppercase or orderBy. Names with special characters, such as hyphens and dots, are not allowed. If you wish to namespace your filters, then you can use capitalization (myappSubsectionFilterx) or underscores (myapp_subsection_filterx).
+         */
+        register(name: string | {}): IServiceProvider;
+    }
+
+    ///////////////////////////////////////////////////////////////////////////
+    // LocaleService
+    // see http://docs.angularjs.org/api/ng.$locale
+    ///////////////////////////////////////////////////////////////////////////
+    interface ILocaleService {
+        id: string;
+
+        // These are not documented
+        // Check angular's i18n files for exemples
+        NUMBER_FORMATS: ILocaleNumberFormatDescriptor;
+        DATETIME_FORMATS: ILocaleDateTimeFormatDescriptor;
+        pluralCat: (num: any) => string;
+    }
+
+    interface ILocaleNumberFormatDescriptor {
+        DECIMAL_SEP: string;
+        GROUP_SEP: string;
+        PATTERNS: ILocaleNumberPatternDescriptor[];
+        CURRENCY_SYM: string;
+    }
+
+    interface ILocaleNumberPatternDescriptor {
+        minInt: number;
+        minFrac: number;
+        maxFrac: number;
+        posPre: string;
+        posSuf: string;
+        negPre: string;
+        negSuf: string;
+        gSize: number;
+        lgSize: number;
+    }
+
+    interface ILocaleDateTimeFormatDescriptor {
+        MONTH: string[];
+        SHORTMONTH: string[];
+        DAY: string[];
+        SHORTDAY: string[];
+        AMPMS: string[];
+        medium: string;
+        short: string;
+        fullDate: string;
+        longDate: string;
+        mediumDate: string;
+        shortDate: string;
+        mediumTime: string;
+        shortTime: string;
+    }
+
+    ///////////////////////////////////////////////////////////////////////////
+    // LogService
+    // see http://docs.angularjs.org/api/ng.$log
+    // see http://docs.angularjs.org/api/ng.$logProvider
+    ///////////////////////////////////////////////////////////////////////////
+    interface ILogService {
+        debug: ILogCall;
+        error: ILogCall;
+        info: ILogCall;
+        log: ILogCall;
+        warn: ILogCall;
+    }
+
+    interface ILogProvider extends IServiceProvider {
+        debugEnabled(): boolean;
+        debugEnabled(enabled: boolean): ILogProvider;
+    }
+
+    // We define this as separate interface so we can reopen it later for
+    // the ngMock module.
+    interface ILogCall {
+        (...args: any[]): void;
+    }
+
+    ///////////////////////////////////////////////////////////////////////////
+    // ParseService
+    // see http://docs.angularjs.org/api/ng.$parse
+    // see http://docs.angularjs.org/api/ng.$parseProvider
+    ///////////////////////////////////////////////////////////////////////////
+    interface IParseService {
+        (expression: string, interceptorFn?: (value: any, scope: IScope, locals: any) => any, expensiveChecks?: boolean): ICompiledExpression;
+    }
+
+    interface IParseProvider {
+        logPromiseWarnings(): boolean;
+        logPromiseWarnings(value: boolean): IParseProvider;
+
+        unwrapPromises(): boolean;
+        unwrapPromises(value: boolean): IParseProvider;
+
+        /**
+         * Configure $parse service to add literal values that will be present as literal at expressions.
+         *
+         * @param literalName Token for the literal value. The literal name value must be a valid literal name.
+         * @param literalValue Value for this literal. All literal values must be primitives or `undefined`.
+         **/
+        addLiteral(literalName: string, literalValue: any): void;
+
+        /**
+         * Allows defining the set of characters that are allowed in Angular expressions. The function identifierStart will get called to know if a given character is a valid character to be the first character for an identifier. The function identifierContinue will get called to know if a given character is a valid character to be a follow-up identifier character. The functions identifierStart and identifierContinue will receive as arguments the single character to be identifier and the character code point. These arguments will be string and numeric. Keep in mind that the string parameter can be two characters long depending on the character representation. It is expected for the function to return true or false, whether that character is allowed or not.
+         * Since this function will be called extensivelly, keep the implementation of these functions fast, as the performance of these functions have a direct impact on the expressions parsing speed.
+         *
+         * @param identifierStart The function that will decide whether the given character is a valid identifier start character.
+         * @param identifierContinue The function that will decide whether the given character is a valid identifier continue character.
+         **/
+        setIdentifierFns(identifierStart?: (character: string, codePoint: number) => boolean,
+            identifierContinue?: (character: string, codePoint: number) => boolean): void;
+    }
+
+    interface ICompiledExpression {
+        (context: any, locals?: any): any;
+
+        literal: boolean;
+        constant: boolean;
+
+        // If value is not provided, undefined is gonna be used since the implementation
+        // does not check the parameter. Let's force a value for consistency. If consumer
+        // whants to undefine it, pass the undefined value explicitly.
+        assign(context: any, value: any): any;
+    }
+
+    /**
+     * $location - $locationProvider - service in module ng
+     * see https://docs.angularjs.org/api/ng/service/$location
+     */
+    interface ILocationService {
+        absUrl(): string;
+        hash(): string;
+        hash(newHash: string): ILocationService;
+        host(): string;
+
+        /**
+         * Return path of current url
+         */
+        path(): string;
+
+        /**
+         * Change path when called with parameter and return $location.
+         * Note: Path should always begin with forward slash (/), this method will add the forward slash if it is missing.
+         *
+         * @param path New path
+         */
+        path(path: string): ILocationService;
+
+        port(): number;
+        protocol(): string;
+        replace(): ILocationService;
+
+        /**
+         * Return search part (as object) of current url
+         */
+        search(): any;
+
+        /**
+         * Change search part when called with parameter and return $location.
+         *
+         * @param search When called with a single argument the method acts as a setter, setting the search component of $location to the specified value.
+         *
+         * If the argument is a hash object containing an array of values, these values will be encoded as duplicate search parameters in the url.
+         */
+        search(search: any): ILocationService;
+
+        /**
+         * Change search part when called with parameter and return $location.
+         *
+         * @param search New search params
+         * @param paramValue If search is a string or a Number, then paramValue will override only a single search property. If paramValue is null, the property specified via the first argument will be deleted. If paramValue is an array, it will override the property of the search component of $location specified via the first argument. If paramValue is true, the property specified via the first argument will be added with no value nor trailing equal sign.
+         */
+        search(search: string, paramValue: string|number|string[]|boolean): ILocationService;
+
+        state(): any;
+        state(state: any): ILocationService;
+        url(): string;
+        url(url: string): ILocationService;
+    }
+
+    interface ILocationProvider extends IServiceProvider {
+        hashPrefix(): string;
+        hashPrefix(prefix: string): ILocationProvider;
+        html5Mode(): boolean;
+
+        // Documentation states that parameter is string, but
+        // implementation tests it as boolean, which makes more sense
+        // since this is a toggler
+        html5Mode(active: boolean): ILocationProvider;
+        html5Mode(mode: { enabled?: boolean; requireBase?: boolean; rewriteLinks?: boolean; }): ILocationProvider;
+    }
+
+    ///////////////////////////////////////////////////////////////////////////
+    // DocumentService
+    // see http://docs.angularjs.org/api/ng.$document
+    ///////////////////////////////////////////////////////////////////////////
+    interface IDocumentService extends JQuery {
+        // Must return intersection type for index signature compatibility with JQuery
+        [index: number]: HTMLElement & Document;
+    }
+
+    ///////////////////////////////////////////////////////////////////////////
+    // ExceptionHandlerService
+    // see http://docs.angularjs.org/api/ng.$exceptionHandler
+    ///////////////////////////////////////////////////////////////////////////
+    interface IExceptionHandlerService {
+        (exception: Error, cause?: string): void;
+    }
+
+    ///////////////////////////////////////////////////////////////////////////
+    // RootElementService
+    // see http://docs.angularjs.org/api/ng.$rootElement
+    ///////////////////////////////////////////////////////////////////////////
+    interface IRootElementService extends JQuery {}
+
+    interface IQResolveReject<T> {
+        (): void;
+        (value: T): void;
+    }
+    /**
+     * $q - service in module ng
+     * A promise/deferred implementation inspired by Kris Kowal's Q.
+     * See http://docs.angularjs.org/api/ng/service/$q
+     */
+    interface IQService {
+        new <T>(resolver: (resolve: IQResolveReject<T>) => any): IPromise<T>;
+        new <T>(resolver: (resolve: IQResolveReject<T>, reject: IQResolveReject<any>) => any): IPromise<T>;
+        <T>(resolver: (resolve: IQResolveReject<T>) => any): IPromise<T>;
+        <T>(resolver: (resolve: IQResolveReject<T>, reject: IQResolveReject<any>) => any): IPromise<T>;
+
+        /**
+         * Combines multiple promises into a single promise that is resolved when all of the input promises are resolved.
+         *
+         * Returns a single promise that will be resolved with an array of values, each value corresponding to the promise at the same index in the promises array. If any of the promises is resolved with a rejection, this resulting promise will be rejected with the same rejection value.
+         *
+         * @param promises An array of promises.
+         */
+        all<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(values: [T1 | IPromise<T1>, T2 | IPromise<T2>, T3 | IPromise<T3>, T4 | IPromise <T4>, T5 | IPromise<T5>, T6 | IPromise<T6>, T7 | IPromise<T7>, T8 | IPromise<T8>, T9 | IPromise<T9>, T10 | IPromise<T10>]): IPromise<[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]>;
+        all<T1, T2, T3, T4, T5, T6, T7, T8, T9>(values: [T1 | IPromise<T1>, T2 | IPromise<T2>, T3 | IPromise<T3>, T4 | IPromise <T4>, T5 | IPromise<T5>, T6 | IPromise<T6>, T7 | IPromise<T7>, T8 | IPromise<T8>, T9 | IPromise<T9>]): IPromise<[T1, T2, T3, T4, T5, T6, T7, T8, T9]>;
+        all<T1, T2, T3, T4, T5, T6, T7, T8>(values: [T1 | IPromise<T1>, T2 | IPromise<T2>, T3 | IPromise<T3>, T4 | IPromise <T4>, T5 | IPromise<T5>, T6 | IPromise<T6>, T7 | IPromise<T7>, T8 | IPromise<T8>]): IPromise<[T1, T2, T3, T4, T5, T6, T7, T8]>;
+        all<T1, T2, T3, T4, T5, T6, T7>(values: [T1 | IPromise<T1>, T2 | IPromise<T2>, T3 | IPromise<T3>, T4 | IPromise <T4>, T5 | IPromise<T5>, T6 | IPromise<T6>, T7 | IPromise<T7>]): IPromise<[T1, T2, T3, T4, T5, T6, T7]>;
+        all<T1, T2, T3, T4, T5, T6>(values: [T1 | IPromise<T1>, T2 | IPromise<T2>, T3 | IPromise<T3>, T4 | IPromise <T4>, T5 | IPromise<T5>, T6 | IPromise<T6>]): IPromise<[T1, T2, T3, T4, T5, T6]>;
+        all<T1, T2, T3, T4, T5>(values: [T1 | IPromise<T1>, T2 | IPromise<T2>, T3 | IPromise<T3>, T4 | IPromise <T4>, T5 | IPromise<T5>]): IPromise<[T1, T2, T3, T4, T5]>;
+        all<T1, T2, T3, T4>(values: [T1 | IPromise<T1>, T2 | IPromise<T2>, T3 | IPromise<T3>, T4 | IPromise <T4>]): IPromise<[T1, T2, T3, T4]>;
+        all<T1, T2, T3>(values: [T1 | IPromise<T1>, T2 | IPromise<T2>, T3 | IPromise<T3>]): IPromise<[T1, T2, T3]>;
+        all<T1, T2>(values: [T1 | IPromise<T1>, T2 | IPromise<T2>]): IPromise<[T1, T2]>;
+        all<TAll>(promises: IPromise<TAll>[]): IPromise<TAll[]>;
+        /**
+         * Combines multiple promises into a single promise that is resolved when all of the input promises are resolved.
+         *
+         * Returns a single promise that will be resolved with a hash of values, each value corresponding to the promise at the same key in the promises hash. If any of the promises is resolved with a rejection, this resulting promise will be rejected with the same rejection value.
+         *
+         * @param promises A hash of promises.
+         */
+        all(promises: { [id: string]: IPromise<any>; }): IPromise<{ [id: string]: any; }>;
+        all<T extends {}>(promises: { [id: string]: IPromise<any>; }): IPromise<T>;
+        /**
+         * Creates a Deferred object which represents a task which will finish in the future.
+         */
+        defer<T>(): IDeferred<T>;
+        /**
+         * Creates a promise that is resolved as rejected with the specified reason. This api should be used to forward rejection in a chain of promises. If you are dealing with the last promise in a promise chain, you don't need to worry about it.
+         *
+         * When comparing deferreds/promises to the familiar behavior of try/catch/throw, think of reject as the throw keyword in JavaScript. This also means that if you "catch" an error via a promise error callback and you want to forward the error to the promise derived from the current promise, you have to "rethrow" the error by returning a rejection constructed via reject.
+         *
+         * @param reason Constant, message, exception or an object representing the rejection reason.
+         */
+        reject(reason?: any): IPromise<any>;
+        /**
+         * Wraps an object that might be a value or a (3rd party) then-able promise into a $q promise. This is useful when you are dealing with an object that might or might not be a promise, or if the promise comes from a source that can't be trusted.
+         *
+         * @param value Value or a promise
+         */
+        resolve<T>(value: IPromise<T>|T): IPromise<T>;
+        /**
+         * Wraps an object that might be a value or a (3rd party) then-able promise into a $q promise. This is useful when you are dealing with an object that might or might not be a promise, or if the promise comes from a source that can't be trusted.
+         */
+        resolve(): IPromise<void>;
+        /**
+         * Wraps an object that might be a value or a (3rd party) then-able promise into a $q promise. This is useful when you are dealing with an object that might or might not be a promise, or if the promise comes from a source that can't be trusted.
+         *
+         * @param value Value or a promise
+         */
+        when<T>(value: IPromise<T>|T): IPromise<T>;
+        when<TResult, T>(value: IPromise<T>|T, successCallback: (promiseValue: T) => IPromise<TResult>|TResult, errorCallback?: (reason: any) => any, notifyCallback?: (state: any) => any): IPromise<TResult>;
+        /**
+         * Wraps an object that might be a value or a (3rd party) then-able promise into a $q promise. This is useful when you are dealing with an object that might or might not be a promise, or if the promise comes from a source that can't be trusted.
+         */
+        when(): IPromise<void>;
+    }
+
+    interface IPromise<T> {
+        /**
+         * Regardless of when the promise was or will be resolved or rejected, then calls one of the success or error callbacks asynchronously as soon as the result is available. The callbacks are called with a single argument: the result or rejection reason. Additionally, the notify callback may be called zero or more times to provide a progress indication, before the promise is resolved or rejected.
+         * The successCallBack may return IPromise<void> for when a $q.reject() needs to be returned
+         * This method returns a new promise which is resolved or rejected via the return value of the successCallback, errorCallback. It also notifies via the return value of the notifyCallback method. The promise can not be resolved or rejected from the notifyCallback method.
+         */
+        then<TResult>(successCallback: (promiseValue: T) => IPromise<TResult>|TResult, errorCallback?: (reason: any) => any, notifyCallback?: (state: any) => any): IPromise<TResult>;
+
+        /**
+         * Shorthand for promise.then(null, errorCallback)
+         */
+        catch<TResult>(onRejected: (reason: any) => IPromise<TResult>|TResult): IPromise<TResult>;
+
+        /**
+         * Allows you to observe either the fulfillment or rejection of a promise, but to do so without modifying the final value. This is useful to release resources or do some clean-up that needs to be done whether the promise was rejected or resolved. See the full specification for more information.
+         *
+         * Because finally is a reserved word in JavaScript and reserved keywords are not supported as property names by ES3, you'll need to invoke the method like promise['finally'](callback) to make your code IE8 and Android 2.x compatible.
+         */
+        finally(finallyCallback: () => any): IPromise<T>;
+    }
+
+    interface IDeferred<T> {
+        resolve(value?: T|IPromise<T>): void;
+        reject(reason?: any): void;
+        notify(state?: any): void;
+        promise: IPromise<T>;
+    }
+
+    ///////////////////////////////////////////////////////////////////////////
+    // AnchorScrollService
+    // see http://docs.angularjs.org/api/ng.$anchorScroll
+    ///////////////////////////////////////////////////////////////////////////
+    interface IAnchorScrollService {
+        (): void;
+        (hash: string): void;
+        yOffset: any;
+    }
+
+    interface IAnchorScrollProvider extends IServiceProvider {
+        disableAutoScrolling(): void;
+    }
+
+    /**
+     * $cacheFactory - service in module ng
+     *
+     * Factory that constructs Cache objects and gives access to them.
+     *
+     * see https://docs.angularjs.org/api/ng/service/$cacheFactory
+     */
+    interface ICacheFactoryService {
+        /**
+         * Factory that constructs Cache objects and gives access to them.
+         *
+         * @param cacheId Name or id of the newly created cache.
+         * @param optionsMap Options object that specifies the cache behavior. Properties:
+         *
+         * capacity — turns the cache into LRU cache.
+         */
+        (cacheId: string, optionsMap?: { capacity?: number; }): ICacheObject;
+
+        /**
+         * Get information about all the caches that have been created.
+         * @returns key-value map of cacheId to the result of calling cache#info
+         */
+        info(): any;
+
+        /**
+         * Get access to a cache object by the cacheId used when it was created.
+         *
+         * @param cacheId Name or id of a cache to access.
+         */
+        get(cacheId: string): ICacheObject;
+    }
+
+    /**
+     * $cacheFactory.Cache - type in module ng
+     *
+     * A cache object used to store and retrieve data, primarily used by $http and the script directive to cache templates and other data.
+     *
+     * see https://docs.angularjs.org/api/ng/type/$cacheFactory.Cache
+     */
+    interface ICacheObject {
+        /**
+         * Retrieve information regarding a particular Cache.
+         */
+        info(): {
+            /**
+             * the id of the cache instance
+             */
+            id: string;
+
+            /**
+             * the number of entries kept in the cache instance
+             */
+            size: number;
+
+            //...: any additional properties from the options object when creating the cache.
+        };
+
+        /**
+         * Inserts a named entry into the Cache object to be retrieved later, and incrementing the size of the cache if the key was not already present in the cache. If behaving like an LRU cache, it will also remove stale entries from the set.
+         *
+         * It will not insert undefined values into the cache.
+         *
+         * @param key the key under which the cached data is stored.
+         * @param value the value to store alongside the key. If it is undefined, the key will not be stored.
+         */
+        put<T>(key: string, value?: T): T;
+
+        /**
+         * Retrieves named data stored in the Cache object.
+         *
+         * @param key the key of the data to be retrieved
+         */
+        get<T>(key: string): T;
+
+        /**
+         * Removes an entry from the Cache object.
+         *
+         * @param key the key of the entry to be removed
+         */
+        remove(key: string): void;
+
+        /**
+         * Clears the cache object of any entries.
+         */
+        removeAll(): void;
+
+        /**
+         * Destroys the Cache object entirely, removing it from the $cacheFactory set.
+         */
+        destroy(): void;
+    }
+
+    ///////////////////////////////////////////////////////////////////////////
+    // CompileService
+    // see http://docs.angularjs.org/api/ng.$compile
+    // see http://docs.angularjs.org/api/ng.$compileProvider
+    ///////////////////////////////////////////////////////////////////////////
+    interface ICompileService {
+        (element: string | Element | JQuery, transclude?: ITranscludeFunction, maxPriority?: number): ITemplateLinkingFunction;
+    }
+
+    interface ICompileProvider extends IServiceProvider {
+        directive(name: string, directiveFactory: Injectable<IDirectiveFactory>): ICompileProvider;
+        directive(object: {[directiveName: string]: Injectable<IDirectiveFactory>}): ICompileProvider;
+
+        component(name: string, options: IComponentOptions): ICompileProvider;
+
+        aHrefSanitizationWhitelist(): RegExp;
+        aHrefSanitizationWhitelist(regexp: RegExp): ICompileProvider;
+
+        imgSrcSanitizationWhitelist(): RegExp;
+        imgSrcSanitizationWhitelist(regexp: RegExp): ICompileProvider;
+
+        debugInfoEnabled(): boolean;
+        debugInfoEnabled(enabled: boolean): ICompileProvider;
+    
+        /**
+         * Sets the number of times $onChanges hooks can trigger new changes before giving up and assuming that the model is unstable.
+         * Increasing the TTL could have performance implications, so you should not change it without proper justification.
+         * Default: 10.
+         * See: https://docs.angularjs.org/api/ng/provider/$compileProvider#onChangesTtl
+         */
+        onChangesTtl(): number;
+        onChangesTtl(limit: number): ICompileProvider;
+    
+        /**
+         * It indicates to the compiler whether or not directives on comments should be compiled.
+         * It results in a compilation performance gain since the compiler doesn't have to check comments when looking for directives.
+         * Defaults to true.
+         * See: https://docs.angularjs.org/api/ng/provider/$compileProvider#commentDirectivesEnabled
+         */
+        commentDirectivesEnabled(): boolean;
+        commentDirectivesEnabled(enabled: boolean): ICompileProvider;
+    
+        /**
+         * It indicates to the compiler whether or not directives on element classes should be compiled.
+         * It results in a compilation performance gain since the compiler doesn't have to check element classes when looking for directives.
+         * Defaults to true.
+         * See: https://docs.angularjs.org/api/ng/provider/$compileProvider#cssClassDirectivesEnabled
+         */
+        cssClassDirectivesEnabled(): boolean;
+        cssClassDirectivesEnabled(enabled: boolean): ICompileProvider;
+    }
+
+    interface ICloneAttachFunction {
+        // Let's hint but not force cloneAttachFn's signature
+        (clonedElement?: JQuery, scope?: IScope): any;
+    }
+
+    // This corresponds to the "publicLinkFn" returned by $compile.
+    interface ITemplateLinkingFunction {
+        (scope: IScope, cloneAttachFn?: ICloneAttachFunction): JQuery;
+    }
+
+    /**
+     * This corresponds to $transclude passed to controllers and to the transclude function passed to link functions.
+     * https://docs.angularjs.org/api/ng/service/$compile#-controller-
+     * http://teropa.info/blog/2015/06/09/transclusion.html
+     */
+    interface ITranscludeFunction {
+        // If the scope is provided, then the cloneAttachFn must be as well.
+        (scope: IScope, cloneAttachFn: ICloneAttachFunction, futureParentElement?: JQuery, slotName?: string): JQuery;
+        // If one argument is provided, then it's assumed to be the cloneAttachFn.
+        (cloneAttachFn?: ICloneAttachFunction, futureParentElement?: JQuery, slotName?: string): JQuery;
+    }
+
+    ///////////////////////////////////////////////////////////////////////////
+    // ControllerService
+    // see http://docs.angularjs.org/api/ng.$controller
+    // see http://docs.angularjs.org/api/ng.$controllerProvider
+    ///////////////////////////////////////////////////////////////////////////
+    interface IControllerService {
+        // Although the documentation doesn't state this, locals are optional
+        <T>(controllerConstructor: new (...args: any[]) => T, locals?: any, later?: boolean, ident?: string): T;
+        <T>(controllerConstructor: Function, locals?: any, later?: boolean, ident?: string): T;
+        <T>(controllerName: string, locals?: any, later?: boolean, ident?: string): T;
+    }
+
+    interface IControllerProvider extends IServiceProvider {
+        register(name: string, controllerConstructor: Function): void;
+        register(name: string, dependencyAnnotatedConstructor: any[]): void;
+        allowGlobals(): void;
+    }
+
+    /**
+     * xhrFactory
+     * Replace or decorate this service to create your own custom XMLHttpRequest objects.
+     * see https://docs.angularjs.org/api/ng/service/$xhrFactory
+     */
+    interface IXhrFactory<T> {
+        (method: string, url: string): T;
+    }
+
+    /**
+     * HttpService
+     * see http://docs.angularjs.org/api/ng/service/$http
+     */
+    interface IHttpService {
+        /**
+         * Object describing the request to be made and how it should be processed.
+         */
+        <T>(config: IRequestConfig): IHttpPromise<T>;
+
+        /**
+         * Shortcut method to perform GET request.
+         *
+         * @param url Relative or absolute URL specifying the destination of the request
+         * @param config Optional configuration object
+         */
+        get<T>(url: string, config?: IRequestShortcutConfig): IHttpPromise<T>;
+
+        /**
+         * Shortcut method to perform DELETE request.
+         *
+         * @param url Relative or absolute URL specifying the destination of the request
+         * @param config Optional configuration object
+         */
+        delete<T>(url: string, config?: IRequestShortcutConfig): IHttpPromise<T>;
+
+        /**
+         * Shortcut method to perform HEAD request.
+         *
+         * @param url Relative or absolute URL specifying the destination of the request
+         * @param config Optional configuration object
+         */
+        head<T>(url: string, config?: IRequestShortcutConfig): IHttpPromise<T>;
+
+        /**
+         * Shortcut method to perform JSONP request.
+         *
+         * @param url Relative or absolute URL specifying the destination of the request
+         * @param config Optional configuration object
+         */
+        jsonp<T>(url: string, config?: IRequestShortcutConfig): IHttpPromise<T>;
+
+        /**
+         * Shortcut method to perform POST request.
+         *
+         * @param url Relative or absolute URL specifying the destination of the request
+         * @param data Request content
+         * @param config Optional configuration object
+         */
+        post<T>(url: string, data: any, config?: IRequestShortcutConfig): IHttpPromise<T>;
+
+        /**
+         * Shortcut method to perform PUT request.
+         *
+         * @param url Relative or absolute URL specifying the destination of the request
+         * @param data Request content
+         * @param config Optional configuration object
+         */
+        put<T>(url: string, data: any, config?: IRequestShortcutConfig): IHttpPromise<T>;
+
+        /**
+         * Shortcut method to perform PATCH request.
+         *
+         * @param url Relative or absolute URL specifying the destination of the request
+         * @param data Request content
+         * @param config Optional configuration object
+         */
+        patch<T>(url: string, data: any, config?: IRequestShortcutConfig): IHttpPromise<T>;
+
+        /**
+         * Runtime equivalent of the $httpProvider.defaults property. Allows configuration of default headers, withCredentials as well as request and response transformations.
+         */
+        defaults: IHttpProviderDefaults;
+
+        /**
+         * Array of config objects for currently pending requests. This is primarily meant to be used for debugging purposes.
+         */
+        pendingRequests: IRequestConfig[];
+    }
+
+    /**
+     * Object describing the request to be made and how it should be processed.
+     * see http://docs.angularjs.org/api/ng/service/$http#usage
+     */
+    interface IRequestShortcutConfig extends IHttpProviderDefaults {
+        /**
+         * {Object.<string|Object>}
+         * Map of strings or objects which will be turned to ?key1=value1&key2=value2 after the url. If the value is not a string, it will be JSONified.
+         */
+        params?: any;
+
+        /**
+         * {string|Object}
+         * Data to be sent as the request message data.
+         */
+        data?: any;
+
+        /**
+         * Timeout in milliseconds, or promise that should abort the request when resolved.
+         */
+        timeout?: number|IPromise<any>;
+
+        /**
+         * See [XMLHttpRequest.responseType]https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest#xmlhttprequest-responsetype
+         */
+        responseType?: string;
+    }
+
+    /**
+     * Object describing the request to be made and how it should be processed.
+     * see http://docs.angularjs.org/api/ng/service/$http#usage
+     */
+    interface IRequestConfig extends IRequestShortcutConfig {
+        /**
+         * HTTP method (e.g. 'GET', 'POST', etc)
+         */
+        method: string;
+        /**
+         * Absolute or relative URL of the resource that is being requested.
+         */
+        url: string;
+        /**
+         * Event listeners to be bound to the XMLHttpRequest object.
+         * To bind events to the XMLHttpRequest upload object, use uploadEventHandlers. The handler will be called in the context of a $apply block.
+         */
+        eventHandlers?: { [type: string]: EventListenerOrEventListenerObject };
+        /**
+         * Event listeners to be bound to the XMLHttpRequest upload object.
+         * To bind events to the XMLHttpRequest object, use eventHandlers. The handler will be called in the context of a $apply block.
+         */
+        uploadEventHandlers?: { [type: string]: EventListenerOrEventListenerObject };
+    }
+
+    interface IHttpHeadersGetter {
+        (): { [name: string]: string; };
+        (headerName: string): string;
+    }
+
+    interface IHttpPromiseCallback<T> {
+        (data: T, status: number, headers: IHttpHeadersGetter, config: IRequestConfig): void;
+    }
+
+    interface IHttpPromiseCallbackArg<T> {
+        data?: T;
+        status?: number;
+        headers?: IHttpHeadersGetter;
+        config?: IRequestConfig;
+        statusText?: string;
+    }
+
+    interface IHttpPromise<T> extends IPromise<IHttpPromiseCallbackArg<T>> {
+        /**
+         * The $http legacy promise methods success and error have been deprecated. Use the standard then method instead.
+         * If $httpProvider.useLegacyPromiseExtensions is set to false then these methods will throw $http/legacy error.
+         * @deprecated
+         */
+        success?(callback: IHttpPromiseCallback<T>): IHttpPromise<T>;
+        /**
+         * The $http legacy promise methods success and error have been deprecated. Use the standard then method instead.
+         * If $httpProvider.useLegacyPromiseExtensions is set to false then these methods will throw $http/legacy error.
+         * @deprecated
+         */
+        error?(callback: IHttpPromiseCallback<any>): IHttpPromise<T>;
+    }
+
+    // See the jsdoc for transformData() at https://github.com/angular/angular.js/blob/master/src/ng/http.js#L228
+    interface IHttpRequestTransformer {
+        (data: any, headersGetter: IHttpHeadersGetter): any;
+    }
+
+    // The definition of fields are the same as IHttpPromiseCallbackArg
+    interface IHttpResponseTransformer {
+        (data: any, headersGetter: IHttpHeadersGetter, status: number): any;
+    }
+
+    type HttpHeaderType = {[requestType: string]:string|((config:IRequestConfig) => string)};
+
+    interface IHttpRequestConfigHeaders {
+        [requestType: string]: any;
+        common?: any;
+        get?: any;
+        post?: any;
+        put?: any;
+        patch?: any;
+    }
+
+    /**
+    * Object that controls the defaults for $http provider. Not all fields of IRequestShortcutConfig can be configured
+    * via defaults and the docs do not say which. The following is based on the inspection of the source code.
+    * https://docs.angularjs.org/api/ng/service/$http#defaults
+    * https://docs.angularjs.org/api/ng/service/$http#usage
+    * https://docs.angularjs.org/api/ng/provider/$httpProvider The properties section
+    */
+    interface IHttpProviderDefaults {
+        /**
+         * {boolean|Cache}
+         * If true, a default $http cache will be used to cache the GET request, otherwise if a cache instance built with $cacheFactory, this cache will be used for caching.
+         */
+        cache?: any;
+
+        /**
+         * Transform function or an array of such functions. The transform function takes the http request body and
+         * headers and returns its transformed (typically serialized) version.
+         * @see {@link https://docs.angularjs.org/api/ng/service/$http#transforming-requests-and-responses}
+         */
+        transformRequest?: IHttpRequestTransformer |IHttpRequestTransformer[];
+
+        /**
+         * Transform function or an array of such functions. The transform function takes the http response body and
+         * headers and returns its transformed (typically deserialized) version.
+         */
+        transformResponse?: IHttpResponseTransformer | IHttpResponseTransformer[];
+
+        /**
+         * Map of strings or functions which return strings representing HTTP headers to send to the server. If the
+         * return value of a function is null, the header will not be sent.
+         * The key of the map is the request verb in lower case. The "common" key applies to all requests.
+         * @see {@link https://docs.angularjs.org/api/ng/service/$http#setting-http-headers}
+         */
+        headers?: IHttpRequestConfigHeaders;
+
+        /** Name of HTTP header to populate with the XSRF token. */
+        xsrfHeaderName?: string;
+
+        /** Name of cookie containing the XSRF token. */
+        xsrfCookieName?: string;
+
+        /**
+         * whether to to set the withCredentials flag on the XHR object. See [requests with credentials]https://developer.mozilla.org/en/http_access_control#section_5 for more information.
+         */
+        withCredentials?: boolean;
+
+        /**
+        * A function used to the prepare string representation of request parameters (specified as an object). If
+        * specified as string, it is interpreted as a function registered with the $injector. Defaults to
+        * $httpParamSerializer.
+        */
+        paramSerializer?: string | ((obj: any) => string);
+    }
+
+    interface IHttpInterceptor {
+        request?: (config: IRequestConfig) => IRequestConfig|IPromise<IRequestConfig>;
+        requestError?: (rejection: any) => any;
+        response?: <T>(response: IHttpPromiseCallbackArg<T>) => IPromise<IHttpPromiseCallbackArg<T>>|IHttpPromiseCallbackArg<T>;
+        responseError?: (rejection: any) => any;
+    }
+
+    interface IHttpInterceptorFactory {
+        (...args: any[]): IHttpInterceptor;
+    }
+
+    interface IHttpProvider extends IServiceProvider {
+        defaults: IHttpProviderDefaults;
+
+        /**
+         * Register service factories (names or implementations) for interceptors which are called before and after
+         * each request.
+         */
+        interceptors: (string | Injectable<IHttpInterceptorFactory>)[];
+        useApplyAsync(): boolean;
+        useApplyAsync(value: boolean): IHttpProvider;
+
+        /**
+         *
+         * @param {boolean=} value If true, `$http` will return a normal promise without the `success` and `error` methods.
+         * @returns {boolean|Object} If a value is specified, returns the $httpProvider for chaining.
+         *    otherwise, returns the current configured value.
+         */
+        useLegacyPromiseExtensions(value:boolean) : boolean | IHttpProvider;
+    }
+
+    ///////////////////////////////////////////////////////////////////////////
+    // HttpBackendService
+    // see http://docs.angularjs.org/api/ng.$httpBackend
+    // You should never need to use this service directly.
+    ///////////////////////////////////////////////////////////////////////////
+    interface IHttpBackendService {
+        // XXX Perhaps define callback signature in the future
+        (method: string, url: string, post?: any, callback?: Function, headers?: any, timeout?: number, withCredentials?: boolean): void;
+    }
+
+    ///////////////////////////////////////////////////////////////////////////
+    // InterpolateService
+    // see http://docs.angularjs.org/api/ng.$interpolate
+    // see http://docs.angularjs.org/api/ng.$interpolateProvider
+    ///////////////////////////////////////////////////////////////////////////
+    interface IInterpolateService {
+        (text: string, mustHaveExpression?: boolean, trustedContext?: string, allOrNothing?: boolean): IInterpolationFunction;
+        endSymbol(): string;
+        startSymbol(): string;
+    }
+
+    interface IInterpolationFunction {
+        (context: any): string;
+    }
+
+    interface IInterpolateProvider extends IServiceProvider {
+        startSymbol(): string;
+        startSymbol(value: string): IInterpolateProvider;
+        endSymbol(): string;
+        endSymbol(value: string): IInterpolateProvider;
+    }
+
+    ///////////////////////////////////////////////////////////////////////////
+    // TemplateCacheService
+    // see http://docs.angularjs.org/api/ng.$templateCache
+    ///////////////////////////////////////////////////////////////////////////
+    interface ITemplateCacheService extends ICacheObject {}
+
+    ///////////////////////////////////////////////////////////////////////////
+    // SCEService
+    // see http://docs.angularjs.org/api/ng.$sce
+    ///////////////////////////////////////////////////////////////////////////
+    interface ISCEService {
+        getTrusted(type: string, mayBeTrusted: any): any;
+        getTrustedCss(value: any): any;
+        getTrustedHtml(value: any): any;
+        getTrustedJs(value: any): any;
+        getTrustedResourceUrl(value: any): any;
+        getTrustedUrl(value: any): any;
+        parse(type: string, expression: string): (context: any, locals: any) => any;
+        parseAsCss(expression: string): (context: any, locals: any) => any;
+        parseAsHtml(expression: string): (context: any, locals: any) => any;
+        parseAsJs(expression: string): (context: any, locals: any) => any;
+        parseAsResourceUrl(expression: string): (context: any, locals: any) => any;
+        parseAsUrl(expression: string): (context: any, locals: any) => any;
+        trustAs(type: string, value: any): any;
+        trustAsHtml(value: any): any;
+        trustAsJs(value: any): any;
+        trustAsResourceUrl(value: any): any;
+        trustAsUrl(value: any): any;
+        isEnabled(): boolean;
+    }
+
+    ///////////////////////////////////////////////////////////////////////////
+    // SCEProvider
+    // see http://docs.angularjs.org/api/ng.$sceProvider
+    ///////////////////////////////////////////////////////////////////////////
+    interface ISCEProvider extends IServiceProvider {
+        enabled(value: boolean): void;
+    }
+
+    ///////////////////////////////////////////////////////////////////////////
+    // SCEDelegateService
+    // see http://docs.angularjs.org/api/ng.$sceDelegate
+    ///////////////////////////////////////////////////////////////////////////
+    interface ISCEDelegateService {
+        getTrusted(type: string, mayBeTrusted: any): any;
+        trustAs(type: string, value: any): any;
+        valueOf(value: any): any;
+    }
+
+
+    ///////////////////////////////////////////////////////////////////////////
+    // SCEDelegateProvider
+    // see http://docs.angularjs.org/api/ng.$sceDelegateProvider
+    ///////////////////////////////////////////////////////////////////////////
+    interface ISCEDelegateProvider extends IServiceProvider {
+        resourceUrlBlacklist(blacklist: any[]): void;
+        resourceUrlWhitelist(whitelist: any[]): void;
+        resourceUrlBlacklist(): any[];
+        resourceUrlWhitelist(): any[];
+    }
+
+    /**
+     * $templateRequest service
+     * see http://docs.angularjs.org/api/ng/service/$templateRequest
+     */
+    interface ITemplateRequestService {
+        /**
+         * Downloads a template using $http and, upon success, stores the
+         * contents inside of $templateCache.
+         *
+         * If the HTTP request fails or the response data of the HTTP request is
+         * empty then a $compile error will be thrown (unless
+         * {ignoreRequestError} is set to true).
+         *
+         * @param tpl                  The template URL.
+         * @param ignoreRequestError   Whether or not to ignore the exception
+         *                             when the request fails or the template is
+         *                             empty.
+         *
+         * @return   A promise whose value is the template content.
+         */
+        (tpl: string, ignoreRequestError?: boolean): IPromise<string>;
+        /**
+         * total amount of pending template requests being downloaded.
+         * @type {number}
+         */
+        totalPendingRequests: number;
+    }
+
+    ///////////////////////////////////////////////////////////////////////////
+    // Component
+    // see http://angularjs.blogspot.com.br/2015/11/angularjs-15-beta2-and-14-releases.html
+    // and http://toddmotto.com/exploring-the-angular-1-5-component-method/
+    ///////////////////////////////////////////////////////////////////////////
+    /**
+     * Component definition object (a simplified directive definition object)
+     */
+    interface IComponentOptions {
+        /**
+         * Controller constructor function that should be associated with newly created scope or the name of a registered
+         * controller if passed as a string. Empty function by default.
+         * Use the array form to define dependencies (necessary if strictDi is enabled and you require dependency injection)
+         */
+        controller?: string | Injectable<IControllerConstructor>;
+        /**
+         * An identifier name for a reference to the controller. If present, the controller will be published to its scope under
+         * the specified name. If not present, this will default to '$ctrl'.
+         */
+        controllerAs?: string;
+        /**
+         * html template as a string or a function that returns an html template as a string which should be used as the
+         * contents of this component. Empty string by default.
+         * If template is a function, then it is injected with the following locals:
+         * $element - Current element
+         * $attrs - Current attributes object for the element
+         * Use the array form to define dependencies (necessary if strictDi is enabled and you require dependency injection)
+         */
+        template?: string | Injectable<(...args: any[]) => string>;
+        /**
+         * Path or function that returns a path to an html template that should be used as the contents of this component.
+         * If templateUrl is a function, then it is injected with the following locals:
+         * $element - Current element
+         * $attrs - Current attributes object for the element
+         * Use the array form to define dependencies (necessary if strictDi is enabled and you require dependency injection)
+         */
+        templateUrl?: string | Injectable<(...args: any[]) => string>;
+        /**
+         * Define DOM attribute binding to component properties. Component properties are always bound to the component
+         * controller and not to the scope.
+         */
+        bindings?: {[boundProperty: string]: string};
+        /**
+         * Whether transclusion is enabled. Disabled by default.
+         */
+        transclude?: boolean | {[slot: string]: string};
+        /**
+         * Requires the controllers of other directives and binds them to this component's controller.
+         * The object keys specify the property names under which the required controllers (object values) will be bound.
+         * Note that the required controllers will not be available during the instantiation of the controller,
+         * but they are guaranteed to be available just before the $onInit method is executed!
+         */
+        require?: {[controller: string]: string};
+    }
+
+    type IControllerConstructor =
+        (new (...args: any[]) => IController) |
+        // Instead of classes, plain functions are often used as controller constructors, especially in examples.
+        ((...args: any[]) => (void | IController));
+
+    /**
+     * Directive controllers have a well-defined lifecycle. Each controller can implement "lifecycle hooks". These are methods that
+     * will be called by Angular at certain points in the life cycle of the directive.
+     * https://docs.angularjs.org/api/ng/service/$compile#life-cycle-hooks
+     * https://docs.angularjs.org/guide/component
+     */
+    interface IController {
+        /**
+         * Called on each controller after all the controllers on an element have been constructed and had their bindings
+         * initialized (and before the pre & post linking functions for the directives on this element). This is a good
+         * place to put initialization code for your controller.
+         */
+        $onInit?(): void;
+        /**
+         * Called on each turn of the digest cycle. Provides an opportunity to detect and act on changes.
+         * Any actions that you wish to take in response to the changes that you detect must be invoked from this hook;
+         * implementing this has no effect on when `$onChanges` is called. For example, this hook could be useful if you wish
+         * to perform a deep equality check, or to check a `Dat`e object, changes to which would not be detected by Angular's
+         * change detector and thus not trigger `$onChanges`. This hook is invoked with no arguments; if detecting changes,
+         * you must store the previous value(s) for comparison to the current values.
+         */
+        $doCheck?(): void;
+        /**
+         * Called whenever one-way bindings are updated. The onChangesObj is a hash whose keys are the names of the bound
+         * properties that have changed, and the values are an {@link IChangesObject} object of the form
+         * { currentValue, previousValue, isFirstChange() }. Use this hook to trigger updates within a component such as
+         * cloning the bound value to prevent accidental mutation of the outer value.
+         */
+        $onChanges?(onChangesObj: IOnChangesObject): void;
+        /**
+         * Called on a controller when its containing scope is destroyed. Use this hook for releasing external resources,
+         * watches and event handlers.
+         */
+        $onDestroy?(): void;
+        /**
+         * Called after this controller's element and its children have been linked. Similar to the post-link function this
+         * hook can be used to set up DOM event handlers and do direct DOM manipulation. Note that child elements that contain
+         * templateUrl directives will not have been compiled and linked since they are waiting for their template to load
+         * asynchronously and their own compilation and linking has been suspended until that occurs. This hook can be considered
+         * analogous to the ngAfterViewInit and ngAfterContentInit hooks in Angular 2. Since the compilation process is rather
+         * different in Angular 1 there is no direct mapping and care should be taken when upgrading.
+         */
+        $postLink?(): void;
+    }
+
+    interface IOnChangesObject {
+        [property: string]: IChangesObject<any>;
+    }
+
+    interface IChangesObject<T> {
+        currentValue: T;
+        previousValue: T;
+        isFirstChange(): boolean;
+    }
+
+    ///////////////////////////////////////////////////////////////////////////
+    // Directive
+    // see http://docs.angularjs.org/api/ng.$compileProvider#directive
+    // and http://docs.angularjs.org/guide/directive
+    ///////////////////////////////////////////////////////////////////////////
+
+    interface IDirectiveFactory {
+        (...args: any[]): IDirective | IDirectiveLinkFn;
+    }
+
+    interface IDirectiveLinkFn {
+        (
+            scope: IScope,
+            instanceElement: JQuery,
+            instanceAttributes: IAttributes,
+            controller?: IController | IController[] | {[key: string]: IController},
+            transclude?: ITranscludeFunction
+        ): void;
+    }
+
+    interface IDirectivePrePost {
+        pre?: IDirectiveLinkFn;
+        post?: IDirectiveLinkFn;
+    }
+
+    interface IDirectiveCompileFn {
+        (
+            templateElement: JQuery,
+            templateAttributes: IAttributes,
+            /**
+             * @deprecated
+             * Note: The transclude function that is passed to the compile function is deprecated,
+             * as it e.g. does not know about the right outer scope. Please use the transclude function
+             * that is passed to the link function instead.
+             */
+            transclude: ITranscludeFunction
+        ): void | IDirectiveLinkFn | IDirectivePrePost;
+    }
+
+    interface IDirective {
+        compile?: IDirectiveCompileFn;
+        controller?: string | Injectable<IControllerConstructor>;
+        controllerAs?: string;
+        /**
+         * Deprecation warning: although bindings for non-ES6 class controllers are currently bound to this before
+         * the controller constructor is called, this use is now deprecated. Please place initialization code that
+         * relies upon bindings inside a $onInit method on the controller, instead.
+         */
+        bindToController?: boolean | {[boundProperty: string]: string};
+        link?: IDirectiveLinkFn | IDirectivePrePost;
+        multiElement?: boolean;
+        priority?: number;
+        /**
+         * @deprecated
+         */
+        replace?: boolean;
+        require?: string | string[] | {[controller: string]: string};
+        restrict?: string;
+        scope?: boolean | {[boundProperty: string]: string};
+        template?: string | ((tElement: JQuery, tAttrs: IAttributes) => string);
+        templateNamespace?: string;
+        templateUrl?: string | ((tElement: JQuery, tAttrs: IAttributes) => string);
+        terminal?: boolean;
+        transclude?: boolean | 'element' | {[slot: string]: string};
+    }
+
+    /**
+     * These interfaces are kept for compatibility with older versions of these type definitions.
+     * Actually, Angular doesn't create a special subclass of jQuery objects. It extends jQuery.prototype
+     * like jQuery plugins do, that's why all jQuery objects have these Angular-specific methods, not
+     * only those returned from angular.element.
+     * See: http://docs.angularjs.org/api/angular.element
+     */
+    interface IAugmentedJQueryStatic extends JQueryStatic {}
+    interface IAugmentedJQuery extends JQuery {}
+
+    /**
+     * Same as IController. Keeping it for compatibility with older versions of these type definitions.
+     */
+    interface IComponentController extends IController {}
+
+    ///////////////////////////////////////////////////////////////////////////
+    // AUTO module (angular.js)
+    ///////////////////////////////////////////////////////////////////////////
+    export module auto {
+
+        ///////////////////////////////////////////////////////////////////////
+        // InjectorService
+        // see http://docs.angularjs.org/api/AUTO.$injector
+        ///////////////////////////////////////////////////////////////////////
+        interface IInjectorService {
+            annotate(fn: Function, strictDi?: boolean): string[];
+            annotate(inlineAnnotatedFunction: any[]): string[];
+            get<T>(name: string, caller?: string): T;
+            get(name: '$anchorScroll'): IAnchorScrollService
+            get(name: '$cacheFactory'): ICacheFactoryService
+            get(name: '$compile'): ICompileService
+            get(name: '$controller'): IControllerService
+            get(name: '$document'): IDocumentService
+            get(name: '$exceptionHandler'): IExceptionHandlerService
+            get(name: '$filter'): IFilterService
+            get(name: '$http'): IHttpService
+            get(name: '$httpBackend'): IHttpBackendService
+            get(name: '$httpParamSerializer'): IHttpParamSerializer
+            get(name: '$httpParamSerializerJQLike'): IHttpParamSerializer
+            get(name: '$interpolate'): IInterpolateService
+            get(name: '$interval'): IIntervalService
+            get(name: '$locale'): ILocaleService
+            get(name: '$location'): ILocationService
+            get(name: '$log'): ILogService
+            get(name: '$parse'): IParseService
+            get(name: '$q'): IQService
+            get(name: '$rootElement'): IRootElementService
+            get(name: '$rootScope'): IRootScopeService
+            get(name: '$sce'): ISCEService
+            get(name: '$sceDelegate'): ISCEDelegateService
+            get(name: '$templateCache'): ITemplateCacheService
+            get(name: '$templateRequest'): ITemplateRequestService
+            get(name: '$timeout'): ITimeoutService
+            get(name: '$window'): IWindowService
+            get<T>(name: '$xhrFactory'): IXhrFactory<T>
+            has(name: string): boolean;
+            instantiate<T>(typeConstructor: Function, locals?: any): T;
+            invoke(inlineAnnotatedFunction: any[]): any;
+            invoke(func: Function, context?: any, locals?: any): any;
+            strictDi: boolean;
+        }
+
+        ///////////////////////////////////////////////////////////////////////
+        // ProvideService
+        // see http://docs.angularjs.org/api/AUTO.$provide
+        ///////////////////////////////////////////////////////////////////////
+        interface IProvideService {
+            // Documentation says it returns the registered instance, but actual
+            // implementation does not return anything.
+            // constant(name: string, value: any): any;
+            /**
+             * Register a constant service, such as a string, a number, an array, an object or a function, with the $injector. Unlike value it can be injected into a module configuration function (see config) and it cannot be overridden by an Angular decorator.
+             *
+             * @param name The name of the constant.
+             * @param value The constant value.
+             */
+            constant(name: string, value: any): void;
+
+            /**
+             * Register a service decorator with the $injector. A service decorator intercepts the creation of a service, allowing it to override or modify the behaviour of the service. The object returned by the decorator may be the original service, or a new service object which replaces or wraps and delegates to the original service.
+             *
+             * @param name The name of the service to decorate.
+             * @param decorator This function will be invoked when the service needs to be instantiated and should return the decorated service instance. The function is called using the injector.invoke method and is therefore fully injectable. Local injection arguments:
+             *
+             * $delegate - The original service instance, which can be monkey patched, configured, decorated or delegated to.
+             */
+            decorator(name: string, decorator: Function): void;
+            /**
+             * Register a service decorator with the $injector. A service decorator intercepts the creation of a service, allowing it to override or modify the behaviour of the service. The object returned by the decorator may be the original service, or a new service object which replaces or wraps and delegates to the original service.
+             *
+             * @param name The name of the service to decorate.
+             * @param inlineAnnotatedFunction This function will be invoked when the service needs to be instantiated and should return the decorated service instance. The function is called using the injector.invoke method and is therefore fully injectable. Local injection arguments:
+             *
+             * $delegate - The original service instance, which can be monkey patched, configured, decorated or delegated to.
+             */
+            decorator(name: string, inlineAnnotatedFunction: any[]): void;
+            factory(name: string, serviceFactoryFunction: Function): IServiceProvider;
+            factory(name: string, inlineAnnotatedFunction: any[]): IServiceProvider;
+            provider(name: string, provider: IServiceProvider): IServiceProvider;
+            provider(name: string, serviceProviderConstructor: Function): IServiceProvider;
+            service(name: string, constructor: Function): IServiceProvider;
+            service(name: string, inlineAnnotatedFunction: any[]): IServiceProvider;
+            value(name: string, value: any): IServiceProvider;
+        }
+
+    }
+
+    /**
+     * $http params serializer that converts objects to strings
+     * see https://docs.angularjs.org/api/ng/service/$httpParamSerializer
+     */
+    interface IHttpParamSerializer {
+        (obj: Object): string;
+    }
+}
+
+interface JQuery {
+    // TODO: events, how to define?
+    //$destroy
+
+    find(element: any): JQuery;
+    find(obj: JQuery): JQuery;
+    controller(name?: string): any;
+    injector(): ng.auto.IInjectorService;
+    /** It's declared generic for custom scope interfaces */
+    scope<T extends ng.IScope>(): T;
+    isolateScope<T extends ng.IScope>(): T;
+
+    inheritedData(key: string, value: any): JQuery;
+    inheritedData(obj: { [key: string]: any; }): JQuery;
+    inheritedData(key?: string): any;
+}
diff --git a/typings/globals/angular/typings.json b/typings/globals/angular/typings.json
new file mode 100644
index 0000000..f890168
--- /dev/null
+++ b/typings/globals/angular/typings.json
@@ -0,0 +1,8 @@
+{
+  "resolution": "main",
+  "tree": {
+    "src": "https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/5f2450ba8001ed38c83eae3c0db93f0a3309180d/angularjs/angular.d.ts",
+    "raw": "registry:dt/angular#1.5.0+20161208205636",
+    "typings": "https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/5f2450ba8001ed38c83eae3c0db93f0a3309180d/angularjs/angular.d.ts"
+  }
+}
diff --git a/typings/globals/jquery/index.d.ts b/typings/globals/jquery/index.d.ts
index ab95cde..cfe1b5a 100644
--- a/typings/globals/jquery/index.d.ts
+++ b/typings/globals/jquery/index.d.ts
@@ -1,5 +1,5 @@
 // Generated by typings
-// Source: https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/c8a69b0b0c71cc00d4ada94a4420fb037b3cc9cd/jquery/jquery.d.ts
+// Source: https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/dc9dabe74a5be62613b17a3605309783a12ff28a/jquery/jquery.d.ts
 interface JQueryAjaxSettings {
     /**
      * The content type sent in the request header that tells the server what kind of response it will accept in return. If the accepts setting needs modification, it is recommended to do so once in the $.ajaxSetup() method.
@@ -26,7 +26,7 @@
      */
     contents?: { [key: string]: any; };
     //According to jQuery.ajax source code, ajax's option actually allows contentType to set to "false"
-    // https://github.com/DefinitelyTyped/DefinitelyTyped/issues/742
+    // https://github.com/borisyankov/DefinitelyTyped/issues/742
     /**
      * When sending data to the server, use this content type. Default is "application/x-www-form-urlencoded; charset=UTF-8", which is fine for most cases. If you explicitly pass in a content-type to $.ajax(), then it is always sent to the server (even if no data is sent). The W3C XMLHttpRequest specification dictates that the charset is always UTF-8; specifying another charset will not force the browser to change the encoding.
      */
@@ -158,7 +158,7 @@
     /**
      * Incorporates the functionality of the .done() and .fail() methods, allowing (as of jQuery 1.8) the underlying Promise to be manipulated. Refer to deferred.then() for implementation details.
      */
-    then<R>(doneCallback: (data: any, textStatus: string, jqXHR: JQueryXHR) => R, failCallback?: (jqXHR: JQueryXHR, textStatus: string, errorThrown: any) => void): JQueryPromise<R>;
+    then(doneCallback: (data: any, textStatus: string, jqXHR: JQueryXHR) => void, failCallback?: (jqXHR: JQueryXHR, textStatus: string, errorThrown: any) => void): JQueryPromise<any>;
     /**
      * Property containing the parsed response if the response Content-Type is json
      */
@@ -322,13 +322,6 @@
 
     // Deprecated - given no typings
     pipe(doneFilter?: (x: any) => any, failFilter?: (x: any) => any, progressFilter?: (x: any) => any): JQueryPromise<any>;
-    
-    /**
-     * Return a Deferred's Promise object.
-     * 
-     * @param target Object onto which the promise methods have to be attached
-     */
-    promise(target?: any): JQueryPromise<T>;
 }
 
 /**
@@ -427,7 +420,6 @@
  * Interface of the JQuery extension of the W3C event object
  */
 interface BaseJQueryEventObject extends Event {
-    currentTarget: Element;
     data: any;
     delegateTarget: Element;
     isDefaultPrevented(): boolean;
@@ -593,16 +585,6 @@
     specialEasing?: Object;
 }
 
-interface JQueryEasingFunction {
-    ( percent: number ): number;
-}
-
-interface JQueryEasingFunctions {
-    [ name: string ]: JQueryEasingFunction;
-    linear: JQueryEasingFunction;
-    swing: JQueryEasingFunction;
-}
-
 /**
  * Static members of jQuery (those on $ and jQuery themselves)
  */
@@ -663,12 +645,6 @@
      */
     get(url: string, data?: Object|string, success?: (data: any, textStatus: string, jqXHR: JQueryXHR) => any, dataType?: string): JQueryXHR;
     /**
-     * Load data from the server using a HTTP GET request.
-     *
-     * @param settings The JQueryAjaxSettings to be used for the request
-     */
-    get(settings : JQueryAjaxSettings): JQueryXHR;
-    /**
      * Load JSON-encoded data from the server using a GET HTTP request.
      *
      * @param url A string containing the URL to which the request is sent.
@@ -713,12 +689,7 @@
      * @param dataType The type of data expected from the server. Default: Intelligent Guess (xml, json, script, text, html).
      */
     post(url: string, data?: Object|string, success?: (data: any, textStatus: string, jqXHR: JQueryXHR) => any, dataType?: string): JQueryXHR;
-    /**
-     * Load data from the server using a HTTP POST request.
-     *
-     * @param settings The JQueryAjaxSettings to be used for the request
-     */
-    post(settings : JQueryAjaxSettings): JQueryXHR;
+
     /**
      * A multi-purpose callbacks list object that provides a powerful way to manage callback lists.
      *
@@ -802,7 +773,7 @@
      *
      * @param removeAll A Boolean indicating whether to remove all jQuery variables from the global scope (including jQuery itself).
      */
-    noConflict(removeAll?: boolean): JQueryStatic;
+    noConflict(removeAll?: boolean): Object;
 
     /**
      * Provides a way to execute callback functions based on one or more objects, usually Deferred objects that represent asynchronous events.
@@ -896,9 +867,6 @@
     /**
      * Effects
      */
-
-    easing: JQueryEasingFunctions;
-
     fx: {
         tick: () => void;
         /**
@@ -1010,7 +978,7 @@
      * @param func The function to process each item against. The first argument to the function is the item, and the second argument is the index. The function should return a Boolean value.  this will be the global window object.
      * @param invert If "invert" is false, or not provided, then the function returns an array consisting of all elements for which "callback" returns true. If "invert" is true, then the function returns an array consisting of all elements for which "callback" returns false.
      */
-    grep<T>(array: T[], func: (elementOfArray?: T, indexInArray?: number) => boolean, invert?: boolean): T[];
+    grep<T>(array: T[], func: (elementOfArray: T, indexInArray: number) => boolean, invert?: boolean): T[];
 
     /**
      * Search for a specified value within an array and return its index (or -1 if not found).
@@ -1077,14 +1045,14 @@
      * @param array The Array to translate.
      * @param callback The function to process each item against. The first argument to the function is the array item, the second argument is the index in array The function can return any value. Within the function, this refers to the global (window) object.
      */
-    map<T, U>(array: T[], callback: (elementOfArray?: T, indexInArray?: number) => U): U[];
+    map<T, U>(array: T[], callback: (elementOfArray: T, indexInArray: number) => U): U[];
     /**
      * Translate all items in an array or object to new array of items.
      * 
      * @param arrayOrObject The Array or Object to translate.
      * @param callback The function to process each item against. The first argument to the function is the value; the second argument is the index or key of the array or object property. The function can return any value to add to the array. A returned array will be flattened into the resulting array. Within the function, this refers to the global (window) object.
      */
-    map(arrayOrObject: any, callback: (value?: any, indexOrKey?: any) => any): any;
+    map(arrayOrObject: any, callback: (value: any, indexOrKey: any) => any): any;
 
     /**
      * Merge the contents of two arrays together into the first array.
@@ -1974,24 +1942,6 @@
     click(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery;
 
     /**
-     * Trigger the "contextmenu" event on an element.
-     */
-    contextmenu(): JQuery;
-    /**
-     * Bind an event handler to the "contextmenu" JavaScript event.
-     *
-     * @param handler A function to execute when the event is triggered.
-     */
-    contextmenu(handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
-    /**
-     * Bind an event handler to the "contextmenu" JavaScript event.
-     *
-     * @param eventData An object containing data that will be passed to the event handler.
-     * @param handler A function to execute when the event is triggered.
-     */
-    contextmenu(eventData: Object, handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
-
-    /**
      * Trigger the "dblclick" event on an element.
      */
     dblclick(): JQuery;
@@ -2290,13 +2240,6 @@
      * Remove an event handler.
      *
      * @param events One or more space-separated event types and optional namespaces, or just namespaces, such as "click", "keydown.myPlugin", or ".myPlugin".
-     * @param handler A handler function previously attached for the event(s), or the special value false. Takes handler with extra args that can be attached with on().
-     */
-    off(events: string, handler: (eventObject: JQueryEventObject, ...args: any[]) => any): JQuery;
-    /**
-     * Remove an event handler.
-     *
-     * @param events One or more space-separated event types and optional namespaces, or just namespaces, such as "click", "keydown.myPlugin", or ".myPlugin".
      * @param handler A handler function previously attached for the event(s), or the special value false.
      */
     off(events: string, handler: (eventObject: JQueryEventObject) => any): JQuery;
@@ -2618,10 +2561,10 @@
     /**
      * Insert content, specified by the parameter, after each element in the set of matched elements.
      * 
-     * param content1 HTML string, DOM element, DocumentFragment, array of elements, or jQuery object to insert after each element in the set of matched elements.
+     * param content1 HTML string, DOM element, array of elements, or jQuery object to insert after each element in the set of matched elements.
      * param content2 One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert after each element in the set of matched elements.
      */
-    after(content1: JQuery|any[]|Element|DocumentFragment|Text|string, ...content2: any[]): JQuery;
+    after(content1: JQuery|any[]|Element|Text|string, ...content2: any[]): JQuery;
     /**
      * Insert content, specified by the parameter, after each element in the set of matched elements.
      * 
@@ -2632,10 +2575,10 @@
     /**
      * Insert content, specified by the parameter, to the end of each element in the set of matched elements.
      * 
-     * param content1 DOM element, DocumentFragment, array of elements, HTML string, or jQuery object to insert at the end of each element in the set of matched elements.
+     * param content1 DOM element, array of elements, HTML string, or jQuery object to insert at the end of each element in the set of matched elements.
      * param content2 One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert at the end of each element in the set of matched elements.
      */
-    append(content1: JQuery|any[]|Element|DocumentFragment|Text|string, ...content2: any[]): JQuery;
+    append(content1: JQuery|any[]|Element|Text|string, ...content2: any[]): JQuery;
     /**
      * Insert content, specified by the parameter, to the end of each element in the set of matched elements.
      * 
@@ -2653,10 +2596,10 @@
     /**
      * Insert content, specified by the parameter, before each element in the set of matched elements.
      * 
-     * param content1 HTML string, DOM element, DocumentFragment, array of elements, or jQuery object to insert before each element in the set of matched elements.
+     * param content1 HTML string, DOM element, array of elements, or jQuery object to insert before each element in the set of matched elements.
      * param content2 One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert before each element in the set of matched elements.
      */
-    before(content1: JQuery|any[]|Element|DocumentFragment|Text|string, ...content2: any[]): JQuery;
+    before(content1: JQuery|any[]|Element|Text|string, ...content2: any[]): JQuery;
     /**
      * Insert content, specified by the parameter, before each element in the set of matched elements.
      * 
@@ -2701,10 +2644,10 @@
     /**
      * Insert content, specified by the parameter, to the beginning of each element in the set of matched elements.
      * 
-     * param content1 DOM element, DocumentFragment, array of elements, HTML string, or jQuery object to insert at the beginning of each element in the set of matched elements.
+     * param content1 DOM element, array of elements, HTML string, or jQuery object to insert at the beginning of each element in the set of matched elements.
      * param content2 One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert at the beginning of each element in the set of matched elements.
      */
-    prepend(content1: JQuery|any[]|Element|DocumentFragment|Text|string, ...content2: any[]): JQuery;
+    prepend(content1: JQuery|any[]|Element|Text|string, ...content2: any[]): JQuery;
     /**
      * Insert content, specified by the parameter, to the beginning of each element in the set of matched elements.
      * 
@@ -2765,9 +2708,8 @@
 
     /**
      * Retrieve all the elements contained in the jQuery set, as an array.
-     * @name toArray
      */
-    toArray(): HTMLElement[];
+    toArray(): any[];
 
     /**
      * Remove the parents of the set of matched elements from the DOM, leaving the matched elements in their place.
@@ -2823,9 +2765,8 @@
     get(index: number): HTMLElement;
     /**
      * Retrieve the elements matched by the jQuery object.
-     * @alias toArray
      */
-    get(): HTMLElement[];
+    get(): any[];
 
     /**
      * Search for a given element from among the matched elements.
diff --git a/typings/globals/jquery/typings.json b/typings/globals/jquery/typings.json
index b07042b..e235da4 100644
--- a/typings/globals/jquery/typings.json
+++ b/typings/globals/jquery/typings.json
@@ -1,8 +1,8 @@
 {
   "resolution": "main",
   "tree": {
-    "src": "https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/c8a69b0b0c71cc00d4ada94a4420fb037b3cc9cd/jquery/jquery.d.ts",
-    "raw": "registry:dt/jquery#1.10.0+20160929162922",
-    "typings": "https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/c8a69b0b0c71cc00d4ada94a4420fb037b3cc9cd/jquery/jquery.d.ts"
+    "src": "https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/dc9dabe74a5be62613b17a3605309783a12ff28a/jquery/jquery.d.ts",
+    "raw": "github:DefinitelyTyped/DefinitelyTyped/jquery/jquery.d.ts#dc9dabe74a5be62613b17a3605309783a12ff28a",
+    "typings": "https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/dc9dabe74a5be62613b17a3605309783a12ff28a/jquery/jquery.d.ts"
   }
 }
diff --git a/typings/globals/socket.io-client/index.d.ts b/typings/globals/socket.io-client/index.d.ts
deleted file mode 100644
index db58959..0000000
--- a/typings/globals/socket.io-client/index.d.ts
+++ /dev/null
@@ -1,663 +0,0 @@
-// Generated by typings
-// Source: https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/7de6c3dd94feaeb21f20054b9f30d5dabc5efabd/socket.io-client/socket.io-client.d.ts
-declare var io: SocketIOClientStatic;
-
-declare module 'socket.io-client' {
-	export = io;
-}
-
-interface SocketIOClientStatic {
-
-	/**
-	 * Looks up an existing 'Manager' for multiplexing. If the user summons:
-	 * 	'io( 'http://localhost/a' );'
-	 * 	'io( 'http://localhost/b' );'
-	 *
-	 * We reuse the existing instance based on the same scheme/port/host, and
-	 * we initialize sockets for each namespace. If autoConnect isn't set to
-	 * false in the options, then we'll automatically connect
-	 * @param uri The uri that we'll connect to, including the namespace, where '/' is the default one (e.g. http://localhost:4000/somenamespace)
-	 * @opts Any connect options that we want to pass along
-	 * @return A Socket object
-	 */
-	( uri: string, opts?: SocketIOClient.ConnectOpts ): SocketIOClient.Socket;
-
-	/**
-	 * Auto-connects to the window location and defalt namespace.
-	 * E.g. window.protocol + '//' + window.host + ':80/'
-	 * @opts Any connect options that we want to pass along
-	 * @return A Socket object
-	 */
-	( opts?: SocketIOClient.ConnectOpts ): SocketIOClient.Socket;
-
-	/**
-	 * @see the default constructor (io(uri, opts))
-	 */
-	connect( uri: string, opts?: SocketIOClient.ConnectOpts ): SocketIOClient.Socket;
-
-	/**
-	 * @see the default constructor (io(opts))
-	 */
-	connect( opts?: SocketIOClient.ConnectOpts ): SocketIOClient.Socket;
-
-	/**
-	 * The socket.io protocol revision number this client works with
-	 * @default 4
-	 */
-	protocol: number;
-
-	/**
-	 * Socket constructor - exposed for the standalone build
-	 */
-	Socket: SocketIOClient.Socket;
-
-	/**
-	 * Manager constructor - exposed for the standalone build
-	 */
-	Manager: SocketIOClient.ManagerStatic;
-}
-
-declare namespace SocketIOClient {
-
-	/**
-	 * The base emiter class, used by Socket and Manager
-	 */
-	interface Emitter {
-		/**
-		 * Adds a listener for a particular event. Calling multiple times will add
-		 * multiple listeners
-		 * @param event The event that we're listening for
-		 * @param fn The function to call when we get the event. Parameters depend on the
-		 * event in question
-		 * @return This Emitter
-		 */
-		on( event: string, fn: Function ):Emitter;
-
-		/**
-		 * @see on( event, fn )
-		 */
-		addEventListener( event: string, fn: Function ):Emitter;
-
-		/**
-		 * Adds a listener for a particular event that will be invoked
-		 * a single time before being automatically removed
-		 * @param event The event that we're listening for
-		 * @param fn The function to call when we get the event. Parameters depend on
-		 * the event in question
-		 * @return This Emitter
-		 */
-		once( event: string, fn: Function ):Emitter;
-
-		/**
-		 * Removes a listener for a particular type of event. This will either
-		 * remove a specific listener, or all listeners for this type of event
-		 * @param event The event that we want to remove the listener of
-		 * @param fn The function to remove, or null if we want to remove all functions
-		 * @return This Emitter
-		 */
-		off( event: string, fn?: Function ):Emitter;
-
-		/**
-		 * @see off( event, fn )
-		 */
-		removeListener( event: string, fn?: Function ):Emitter;
-
-		/**
-		 * @see off( event, fn )
-		 */
-		removeEventListener( event: string, fn?: Function ):Emitter;
-
-		/**
-		 * Removes all event listeners on this object
-		 * @return This Emitter
-		 */
-		removeAllListeners():Emitter;
-
-		/**
-		 * Emits 'event' with the given args
-		 * @param event The event that we want to emit
-		 * @param args Optional arguments to emit with the event
-		 * @return Emitter
-		 */
-		emit( event: string, ...args: any[] ):Emitter;
-
-		/**
-		 * Returns all the callbacks for a particular event
-		 * @param event The event that we're looking for the callbacks of
-		 * @return An array of callback Functions, or an empty array if we don't have any
-		 */
-		listeners( event: string ):Function[];
-
-		/**
-		 * Returns if we have listeners for a particular event
-		 * @param event The event that we want to check if we've listeners for
-		 * @return True if we have listeners for this event, false otherwise
-		 */
-		hasListeners( event: string ):boolean;
-	}
-
-	/**
-	 * The Socket static interface
-	 */
-	interface SocketStatic {
-
-		/**
-		 * Creates a new Socket, used for communicating with a specific namespace
-		 * @param io The Manager that's controlling this socket
-		 * @param nsp The namespace that this socket is for (@default '/')
-		 * @return A new Socket
-		 */
-		( io: SocketIOClient.Manager, nsp: string ): Socket;
-
-		/**
-		 * Creates a new Socket, used for communicating with a specific namespace
-		 * @param io The Manager that's controlling this socket
-		 * @param nsp The namespace that this socket is for (@default '/')
-		 * @return A new Socket
-		 */
-		new ( url: string, opts: any ): SocketIOClient.Manager;
-	}
-
-	/**
-	 * The Socket that we use to connect to a Namespace on the server
-	 */
-	interface Socket extends Emitter {
-
-		/**
-		 * The Manager that's controller this socket
-		 */
-		io: SocketIOClient.Manager;
-
-		/**
-		 * The namespace that this socket is for
-		 * @default '/'
-		 */
-		nsp: string;
-
-		/**
-		 * The ID of the socket; matches the server ID and is set when we're connected, and cleared
-		 * when we're disconnected
-		 */
-		id: string;
-
-		/**
-		 * Are we currently connected?
-		 * @default false
-		 */
-		connected: boolean;
-
-		/**
-		 * Are we currently disconnected?
-		 * @default true
-		 */
-		disconnected: boolean;
-
-		/**
-		 * Opens our socket so that it connects. If the 'autoConnect' option for io is
-		 * true (default), then this is called automatically when the Socket is created
-		 */
-		open(): Socket;
-
-		/**
-		 * @see open();
-		 */
-		connect(): Socket;
-
-		/**
-		 * Sends a 'message' event
-		 * @param args Any optional arguments that we want to send
-		 * @see emit
-		 * @return This Socket
-		 */
-		send( ...args: any[] ):Socket;
-
-		/**
-		 * An override of the base emit. If the event is one of:
-		 * 	connect
-		 * 	connect_error
-		 * 	connect_timeout
-		 * 	connecting
-		 * 	disconnect
-		 * 	error
-		 * 	reconnect
-		 * 	reconnect_attempt
-		 * 	reconnect_failed
-		 * 	reconnect_error
-		 * 	reconnecting
-		 * 	ping
-		 * 	pong
-		 * then the event is emitted normally. Otherwise, if we're connected, the
-		 * event is sent. Otherwise, it's buffered.
-		 *
-		 * If the last argument is a function, then it will be called
-		 * as an 'ack' when the response is received. The parameter(s) of the
-		 * ack will be whatever data is returned from the event
-		 * @param event The event that we're emitting
-		 * @param args Optional arguments to send with the event
-		 * @return This Socket
-		 */
-		emit( event: string, ...args: any[] ):Socket;
-
-		/**
-		 * Disconnects the socket manually
-		 * @return This Socket
-		 */
-		close():Socket;
-
-		/**
-		 * @see close()
-		 */
-		disconnect():Socket;
-
-		/**
-		* Sets the compress flag.
-		* @param compress If `true`, compresses the sending data
-		* @return this Socket
-		*/
-		compress(compress: boolean):Socket;
-	}
-
-	/**
-	 * The Manager static interface
-	 */
-	interface ManagerStatic {
-		/**
-		 * Creates a new Manager
-		 * @param uri The URI that we're connecting to (e.g. http://localhost:4000)
-		 * @param opts Any connection options that we want to use (and pass to engine.io)
-		 * @return A Manager
-		 */
-		( uri: string, opts?: SocketIOClient.ConnectOpts ): SocketIOClient.Manager;
-
-		/**
-		 * Creates a new Manager with the default URI (window host)
-		 * @param opts Any connection options that we want to use (and pass to engine.io)
-		 */
-		( opts: SocketIOClient.ConnectOpts ):SocketIOClient.Manager;
-
-		/**
-		 * @see default constructor
-		 */
-		new ( uri: string, opts?: SocketIOClient.ConnectOpts ): SocketIOClient.Manager;
-
-		/**
-		 * @see default constructor
-		 */
-		new ( opts: SocketIOClient.ConnectOpts ):SocketIOClient.Manager;
-	}
-
-	/**
-	 * The Manager class handles all the Namespaces and Sockets that we're using
-	 */
-	interface Manager extends Emitter {
-
-		/**
-		 * All the namespaces currently controlled by this Manager, and the Sockets
-		 * that we're using to communicate with them
-		 */
-		nsps: { [namespace:string]: Socket };
-
-		/**
-		 * The connect options that we used when creating this Manager
-		 */
-		opts: SocketIOClient.ConnectOpts;
-
-		/**
-		 * The state of the Manager. Either 'closed', 'opening', or 'open'
-		 */
-		readyState: string;
-
-		/**
-		 * The URI that this manager is for (host + port), e.g. 'http://localhost:4000'
-		 */
-		uri: string;
-
-		/**
-		 * The currently connected sockets
-		 */
-		connecting: Socket[];
-
-		/**
-		 * If we should auto connect (also used when creating Sockets). Set via the
-		 * opts object
-		 */
-		autoConnect: boolean;
-
-		/**
-		 * Gets if we should reconnect automatically
-		 * @default true
-		 */
-		reconnection(): boolean;
-
-		/**
-		 * Sets if we should reconnect automatically
-		 * @param v True if we should reconnect automatically, false otherwise
-		 * @default true
-		 * @return This Manager
-		 */
-		reconnection( v: boolean ): Manager;
-
-		/**
-		 * Gets the number of reconnection attempts we should try before giving up
-		 * @default Infinity
-		 */
-		reconnectionAttempts(): number;
-
-		/**
-		 * Sets the number of reconnection attempts we should try before giving up
-		 * @param v The number of attempts we should do before giving up
-		 * @default Infinity
-		 * @return This Manager
-		 */
-		reconnectionAttempts( v: number ): Manager;
-
-		/**
-		 * Gets the delay in milliseconds between each reconnection attempt
-		 * @default 1000
-		 */
-		reconnectionDelay(): number;
-
-		/**
-		 * Sets the delay in milliseconds between each reconnection attempt
-		 * @param v The delay in milliseconds
-		 * @default 1000
-		 * @return This Manager
-		 */
-		reconnectionDelay( v: number ): Manager;
-
-		/**
-		 * Gets the max reconnection delay in milliseconds between each reconnection
-		 * attempt
-		 * @default 5000
-		 */
-		reconnectionDelayMax(): number;
-
-		/**
-		 * Sets the max reconnection delay in milliseconds between each reconnection
-		 * attempt
-		 * @param v The max reconnection dleay in milliseconds
-		 * @return This Manager
-		 */
-		reconnectionDelayMax( v: number ): Manager;
-
-		/**
-		 * Gets the randomisation factor used in the exponential backoff jitter
-		 * when reconnecting
-		 * @default 0.5
-		 */
-		randomizationFactor(): number;
-
-		/**
-		 * Sets the randomisation factor used in the exponential backoff jitter
-		 * when reconnecting
-		 * @param The reconnection randomisation factor
-		 * @default 0.5
-		 * @return This Manager
-		 */
-		randomizationFactor( v: number ): Manager;
-
-		/**
-		 * Gets the timeout in milliseconds for our connection attempts
-		 * @default 20000
-		 */
-		timeout(): number;
-
-		/**
-		 * Sets the timeout in milliseconds for our connection attempts
-		 * @param The connection timeout milliseconds
-		 * @return This Manager
-		 */
-		timeout(v: boolean): Manager;
-
-		/**
-		 * Sets the current transport socket and opens our connection
-		 * @param fn An optional callback to call when our socket has either opened, or
-		 * failed. It can take one optional parameter of type Error
-		 * @return This Manager
-		 */
-		open( fn?: (err?: any) => void ): Manager;
-
-		/**
-		 * @see open( fn );
-		 */
-		connect( fn?: (err?: any) => void ): Manager;
-
-		/**
-		 * Creates a new Socket for the given namespace
-		 * @param nsp The namespace that this Socket is for
-		 * @return A new Socket, or if one has already been created for this namespace,
-		 * an existing one
-		 */
-		socket( nsp: string ): Socket;
-	}
-
-	/**
-	 * Options we can pass to the socket when connecting
-	 */
-	interface ConnectOpts {
-
-		/**
-		 * Should we force a new Manager for this connection?
-		 * @default false
-		 */
-		forceNew?: boolean;
-
-		/**
-		 * Should we multiplex our connection (reuse existing Manager) ?
-		 * @default true
-		 */
-		multiplex?: boolean;
-
-		/**
-		 * The path to get our client file from, in the case of the server
-		 * serving it
-		 * @default '/socket.io'
-		 */
-		path?: string;
-
-		/**
-		 * Should we allow reconnections?
-		 * @default true
-		 */
-		reconnection?: boolean;
-
-		/**
-		 * How many reconnection attempts should we try?
-		 * @default Infinity
-		 */
-		reconnectionAttempts?: number;
-
-		/**
-		 * The time delay in milliseconds between reconnection attempts
-		 * @default 1000
-		 */
-		reconnectionDelay?: number;
-
-		/**
-		 * The max time delay in milliseconds between reconnection attempts
-		 * @default 5000
-		 */
-		reconnectionDelayMax?: number;
-
-		/**
-		 * Used in the exponential backoff jitter when reconnecting
-		 * @default 0.5
-		 */
-		randomizationFactor?: number;
-
-		/**
-		 * The timeout in milliseconds for our connection attempt
-		 * @default 20000
-		 */
-		timeout?: number;
-
-		/**
-		 * Should we automically connect?
-		 * @default true
-		 */
-		autoConnect?: boolean;
-
-		/**
-		 * The host that we're connecting to. Set from the URI passed when connecting
-		 */
-		host?: string;
-
-		/**
-		 * The hostname for our connection. Set from the URI passed when connecting
-		 */
-		hostname?: string;
-
-		/**
-		 * If this is a secure connection. Set from the URI passed when connecting
-		 */
-		secure?: boolean;
-
-		/**
-		 * The port for our connection. Set from the URI passed when connecting
-		 */
-		port?: string;
-
-		/**
-		 * Any query parameters in our uri. Set from the URI passed when connecting
-		 */
-		query?: Object;
-
-		/**
-		 * `http.Agent` to use, defaults to `false` (NodeJS only)
-		 */
-		agent?: string|boolean;
-
-		/**
-		 * Whether the client should try to upgrade the transport from
-		 * long-polling to something better.
-		 * @default true
-		 */
-		upgrade?: boolean;
-
-		/**
-		 * Forces JSONP for polling transport.
-		 */
-		forceJSONP?: boolean;
-
-		/**
-		 * Determines whether to use JSONP when necessary for polling. If
-		 * disabled (by settings to false) an error will be emitted (saying
-		 * "No transports available") if no other transports are available.
-		 * If another transport is available for opening a connection (e.g.
-		 * WebSocket) that transport will be used instead.
-		 * @default true
-		 */
-		jsonp?: boolean;
-
-		/**
-		 * Forces base 64 encoding for polling transport even when XHR2
-		 * responseType is available and WebSocket even if the used standard
-		 * supports binary.
-		 */
-		forceBase64?: boolean;
-
-		/**
-		 * Enables XDomainRequest for IE8 to avoid loading bar flashing with
-		 * click sound. default to `false` because XDomainRequest has a flaw
-		 * of not sending cookie.
-		 * @default false
-		 */
-		enablesXDR?: boolean;
-
-		/**
-		 * The param name to use as our timestamp key
-		 * @default 't'
-		 */
-		timestampParam?: string;
-
-		/**
-		 * Whether to add the timestamp with each transport request. Note: this
-		 * is ignored if the browser is IE or Android, in which case requests
-		 * are always stamped
-		 * @default false
-		 */
-		timestampRequests?: boolean;
-
-		/**
-		 * A list of transports to try (in order). Engine.io always attempts to
-		 * connect directly with the first one, provided the feature detection test
-		 * for it passes.
-		 * @default ['polling','websocket']
-		 */
-		transports?: string[];
-
-		/**
-		 * The port the policy server listens on
-		 * @default 843
-		 */
-		policyPost?: number;
-
-		/**
-		 * If true and if the previous websocket connection to the server succeeded,
-		 * the connection attempt will bypass the normal upgrade process and will
-		 * initially try websocket. A connection attempt following a transport error
-		 * will use the normal upgrade process. It is recommended you turn this on
-		 * only when using SSL/TLS connections, or if you know that your network does
-		 * not block websockets.
-		 * @default false
-		 */
-		rememberUpgrade?: boolean;
-
-		/**
-		 * Are we only interested in transports that support binary?
-		 */
-		onlyBinaryUpgrades?: boolean;
-
-		/**
-		 * (SSL) Certificate, Private key and CA certificates to use for SSL.
-		 * Can be used in Node.js client environment to manually specify
-		 * certificate information.
-		 */
-		pfx?: string;
-
-		/**
-		 * (SSL) Private key to use for SSL. Can be used in Node.js client
-		 * environment to manually specify certificate information.
-		 */
-		key?: string;
-
-		/**
-		 * (SSL) A string or passphrase for the private key or pfx. Can be
-		 * used in Node.js client environment to manually specify certificate
-		 * information.
-		 */
-		passphrase?: string
-
-		/**
-		 * (SSL) Public x509 certificate to use. Can be used in Node.js client
-		 * environment to manually specify certificate information.
-		 */
-		cert?: string;
-
-		/**
-		 * (SSL) An authority certificate or array of authority certificates to
-		 * check the remote host against.. Can be used in Node.js client
-		 * environment to manually specify certificate information.
-		 */
-		ca?: string|string[];
-
-		/**
-		 * (SSL) A string describing the ciphers to use or exclude. Consult the
-		 * [cipher format list]
-		 * (http://www.openssl.org/docs/apps/ciphers.html#CIPHER_LIST_FORMAT) for
-		 * details on the format.. Can be used in Node.js client environment to
-		 * manually specify certificate information.
-		 */
-		ciphers?: string;
-
-		/**
-		 * (SSL) If true, the server certificate is verified against the list of
-		 * supplied CAs. An 'error' event is emitted if verification fails.
-		 * Verification happens at the connection level, before the HTTP request
-		 * is sent. Can be used in Node.js client environment to manually specify
-		 * certificate information.
-		 */
-		rejectUnauthorized?: boolean;
-
-	}
-}
diff --git a/typings/globals/socket.io-client/typings.json b/typings/globals/socket.io-client/typings.json
deleted file mode 100644
index f29e7a2..0000000
--- a/typings/globals/socket.io-client/typings.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
-  "resolution": "main",
-  "tree": {
-    "src": "https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/7de6c3dd94feaeb21f20054b9f30d5dabc5efabd/socket.io-client/socket.io-client.d.ts",
-    "raw": "registry:dt/socket.io-client#1.4.4+20160317120654",
-    "typings": "https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/7de6c3dd94feaeb21f20054b9f30d5dabc5efabd/socket.io-client/socket.io-client.d.ts"
-  }
-}
diff --git a/typings/index.d.ts b/typings/index.d.ts
index 9c895bb..dfa460a 100644
--- a/typings/index.d.ts
+++ b/typings/index.d.ts
@@ -1,5 +1,9 @@
+/// <reference path="globals/angular-cookies/index.d.ts" />
+/// <reference path="globals/angular-mocks/index.d.ts" />
+/// <reference path="globals/angular-resource/index.d.ts" />
+/// <reference path="globals/angular-ui-router/index.d.ts" />
+/// <reference path="globals/angular/index.d.ts" />
 /// <reference path="globals/es6-shim/index.d.ts" />
 /// <reference path="globals/jasmine/index.d.ts" />
 /// <reference path="globals/jquery/index.d.ts" />
 /// <reference path="globals/require/index.d.ts" />
-/// <reference path="globals/socket.io-client/index.d.ts" />
