Making changes more pythonic.