better split of code between lib.rs and store.rs.