Fix crash with private chat channels
global.lua cleanup

Removed unused functions
Fix bug in condition:clone()