Optimization changes for Scan by key + Added Offset Support