Added Python IO functions

and tidied up some typos