Added more lua functionality