rollback undesired changes per feedback

- remove module-level docstring
  (but? pep-257, "All modules should normally have docstrings" ??)
- try to restore original import ordering
  (unused imports remain removed)
- restore deep import of os environ, isatty
- restore "caching doesn't work" scrap code

This is to catch up with the 'master' branch where this commit was already made. this will become very time consuming to be able to propose more than a single change/pull req at a time, isn't there an easier way than this?