Changed so that  is passed to the view rather than passing the whole options array.