Refactor services