Pass timeout to whoosh writer, allow setting it in app.config
Add some docstrings to make the thing more readable