Migrate FileStateDatabase as header only lib and submodule