Working on topic database generation