Refactor to services