relocated algorithms for ease of use, about to branch
fixed errs, and sorting for egreedy
fixed errs, and sorting for egreedy
egreedy seems to work
small edit
merging