Restructured JS modules.
Updated angularjs package.
Added background tasks and rules.