unit tests added

karma configuration
unit tests for main.js
controllers ctor adapted