Added python client and some bugfixes.