A lot of more 'pythonic' code.