Condense similar code blocks into a method - get_module_info