Added multi retries, resolves #8

Not complete.
Still need to add tests.

@andreasohlund can u review so far?