Move store_t to another file, and fix its API.
Fix const-correctness.
Simplify impl API.