Removes old config value and wrapps json call in anonymouse function