Cleanup; rework S.__repr__

* add helpful docstrings with examples
* clean up some code
* rework S.__repr__ so it doesn't execute a search--now it shows
  you the query it's got so far