Rewritten to use the module-based require method