wider output

add basic sort to mongo query
cleanup

- removed commented code
- docstrings
- added ensure index to fields found in ini-file