Start implementing kmRay3 and associated functions