Pythonic improvements.
More pythonic improvements.
Minor cleanup.