inital fixes

Still doesn't work, but no more time.
Maybe some help, from someone with Python experience is needed :)