Sorry for this - but based on the performance of the tests we ran before, I think we need to break the _addons, _cores and _modules into separate functions so that we can have separate transactions for each. Otherwise we may end up in a very long transaction run time.