Refactor modules, export the functions directly