Clean up listen.py

Signed-off-by: Michal Demin <michaldemin@gmail.com>