view template is now returned by JSON output, and fixed null history state for starting page