SpanId: bugfixes, better test suite