Rework module API to prepare for loading