Merge pull request #265 from csmith/master

Introduce getChannels and tidy up.
Make getChannel optional.