Adding a Channel class
Some cleaning and comments