Updated ls-modules to use the same code as lmh gen