Refactoring the outbound adapter