cleaned / refactored PYClient