Tidying up. PEP 8 fixes.
Move get_channel_id function down.