cleanup and some fixes
revert database settings