Replace shared_ptr state management with direct function call Add regex support for pattern matching Remove unused test_store argument