Minor refactoring & channel allocation fix