Some code refactoring in jabber.c