Basic Python corrections

Just fixed up Pythonic syntax, nothing major