Enables loading as module
Adds data loading function