Create a listener structure for changes to refs and index