Refactoring to fix multi line receiver issues