Polishing of high level python interface and add tests

Please review and try to compile. I know the high level API works but I have not yet managed to compile thids package using autotool. All low level methods are re-introduced. I hope I did not break anything....
And notice that I added tests :-)