Refactors render methods to eliminate duplicated code