Added new Lua class implementation, and more of image and matrix homogeization