Created edit channel function & cleaned up a bit