shad/algo2: many fixes after review.
shad/algo2: review changes.
review commit
review commit