loader update to work with events and modules