remove deprecated code in lua tests & template