reorganiazed code; only expose `luacheck` module and function as public