Modify the lua binding template functions