Made more pythonic.