Part 2 of the imagedatabase stuff.