remove channels which no longer have consumers
refactor