Refactoring: separate pyx with pyd