improve python bind modularity