Added lua macros and CMake build