Services refactor

Splitted business logic from ws