updating to use lua and refactoring
makefile changes