improved modules.json format and parsing