finished cleanup for sender.cpp