-Added depth parameter to CastRays function
-Fixed some warnings