total refactor for pyxie