Changed verse query to get verse IDs from database as well.