core: refactor Module to hold list of imports instead of map