Implemented a bit of LuaMain

Also added lua5.1 to the project