Add config file, make primary key configurable, allow NULL in store id