dc2b-56: Refactor code and extract all business logic out form controller to new created service.
Merge code