Add replace functionality to localStore
Use replace API from localStore
A little cleanup