A few bug fixes
Adding snapshot mechanism to optimize resolve