Refactoring in RenderEntity.