Mobile browsers will look for preset url paths to find an icon for the site despite the link tags in thead pointing to different locations.  This leads to 404s on every request and really bogs down the server.
canonicalize search terms to lowercase to improve caching properties
remove some code duplication for json responses and set proper expires headers for responses that can be cached