removed type synonym Attributes, refactored successOrFailure()
just one Failure case
removed if
further simplifications
added some more asserts
minor simplification
added parameter validation