Some cleanup to bot core and IRC handler.