Changed db format for db cleaning
Implemented DB clean.