Refactoring masterrenderer.
More masterrenderer refactor.
rayserver wip.