Store channels in dict instead of list

Also removed unused and unneccessary code