Refactored all sender code