tidy up a bit, make channel counts explicit in places