Unit tests for spans and some consistency changes.