Implemented before_retry.
Simplified various used arguments.
Made it possible to create as an object.
Merge pull request #3 from kaspernj/kj/before_retry

Before Retry block