Restructure of the whole framework so that it can work with multiple channel numbers