documented classes, refactored `listen`, refactored tests