Began writing a lua portion

It should be integrated later using lunatic-python