Modified render function to extract variables for view and removed parameter.