cleanup on cloud db code