Remove Jabber-specific logic and add tests