Converted DB to hold generic data. Fixed mem leak collection bug