Refactoring to allow multiple renderings