Correct distinct ISBNs in fill.sql. Small changes improving functions.