Various fixes. More proper test coverage for modifyIdentity and signature composition.