Refactoring of flexstore