Making render a local function again