Refactoring test setup.

Flow ok, tests not executing.

Karma OK.

Karma Jasmine Require tests working.