Made changes for standard DB use