added ray class
fixed some bugs (heh, heh), added Ray type
Added lua support for ray