Ek setup staging

Make changes required to get Kete running on heroku. Also fixed bug in SearchQuery.