Functionality to update refs
Unit tests