templatized rect classes
switched to lua 5.2 from luajit and resolved critical bug