Refactor ESP /service