#18 unify toCommon and toXmpp to toCommon