Adding Ray class to hierarchy