code review changes + small bug fixure in memory store