sender.py: cleanup and comments