Updating code as per pep8 recommendations

- Not everything is updated, some parts don't make sense enough to
  follow