Adds Python 3.x support for map calls

Wraps map() calls with list() where considered necessary.