integration refactoring

I think that there is very much logic in this service.