Made python scripts more "pythonic"