began lua implementation
removed some old lua code