fix lastedit in nested2flat, start moving standard stuff to utils xqy