Cleaned up code and made sure # of channels was printed at the front of the array