finish sniff refactorings on db class.