split_span() and lexicon error checking added.