refactoring for a simpler design. rewrite docs.  config format changed.