Refactor and use a proper service class