Added Filter functionality to channels page and cleaned up code