Some code fixes
Add csv export for searchresult. Fixes #108