Implemented -cleanup-db, removed messages, Fixed pgdb sync, fixed undefined common:simple-file-lock