Ensuring the bot only attempts to connect to the channel after registering with the network. Also removing some extraneous junk code.