refactor class Xep0045