Fixed rays

fixed rays for lighting and added useless code that will be removed
later.