lua: add testfile and  makefile for running tests
Lua: use unused variable macro to suppress warnings
lua: splitting plugin into smaller chunks

Will make it easier to test and debug