Fix python client api, refactor, remove dependencies