Added unit tests for SuccessOrErrors and improved a few things in it