move pyx.def to data hierachy