Added exponential back-off helper.
Added flatten method.