Split huge `ListenStream()` function into smaller functions