finished rewrite, simplified things greatly.  updated readme.