Refactor slightly to avoid reentrancy in the case of an unhandled error in a callback function.

An error in the callback function is caught by the catch() statement in repo() and then the same callback is called once more from the catch() statement. This leads to very confusing output from the callback and also hides potentially useful crash information when the callback is initially called and errors out.
Merge pull request #2 from nixta/nixta-working

Refactor slightly to avoid double-entry in the case of an unhandled error in the callback function