Refactoring multiple lua modules into luaPackages

Please, feel free to contest.