Fix treatment of nulls, remove overuse of lists and stringinfo.