more comments and reorder of algorithus detritus removed example script edited