Database and related functions changed to handle the seed.