sender refactoring and cleanup