Complete rewrite of lists to be null-terminated arrays.