Refactor y tests de services