Refactored render method in sub-methods