put base function in LGM.base table

Also re-organized module to not pollute the global namespace