Added functionality to read config from DB