WIP Local Storage

Rework on Local Repository to enable flushing. Added mapping
I like this flush method, very elegant.