Correct lua var ref

- Updates to templates to add lua support