LERGO-347 - implementing the pre-rendering logic.