Converted to use view and scope for rendering