full refactor xsys api