added synchronized in various places

and removed some unused functions in dboperator