Lua scripts and html pages for foo_mg