Result Set Ranges + More Stat analysis funcs

And some API internals changed