Added documentation and renamed methods of ray.