Changed nice dict comprehension to old style based on list comprehension, to ensure functioning with python 2.6