Refactor base service