Added prototype for getChannels
Various minor debugging fixes