Made rewriting of old style URLs for JSON feed better. Added some more facet search param options

Main code rev. 1823