Switch to using get_modules, for cleaner code
Dictionary comprehension, cleanup
Helper functions, mend for Py2k :(