doc
Python interface
Small refactoring