Improved channel handling; Various bugfixes