Refactoring rendering