Let's see what effect this has. First check if we have a db, and then do the title collecting and query if need be for a present db argument, in one switch.