Moved away from python3 dict comprehension syntax for compatibility.