#0|+Vinay | Adding jasmine specs for distribution service. Refactoring distribution controller to move code into service.