Expanded commandline options for configuring the adaptive retrieval method. Fixed a bug on the retrieval iteration thread.
Fixing numerous typos and bugs
Fixed some tab/space consistency. Removed an old bogus line of code