Made things more pythonic