Fixed python2.6 compatiblity, formating and spelling