Further refactor render method