Refactor render calls