[SfM] Code cleaning