Changed to use sqlite DB interface