Channel cleanup and tests.

Signed-off-by: Martin Raspaud <martin.raspaud@smhi.se>
Merge commit 'c8e34d86ecd2bf93f2cbfbf3a2750cd625769d7a' into HEAD