updates readme
  updates code with various fixes and cleanup