Changed appropriate functions to const and static
Draft of inner rays.