Code version after Nature review.