SFM: Updated incremental code to consider external data structure updates