Modularised render code and resulting simpler test