Updated DoRec, minor changes

Updated to DoRec into RecursiveDo
Rearranged some content and updated comments