Converted it all to lua and an LL1 (I think?) parser