Fixed some lack of pythonic style