Adding more tests and cleanup for sender.