Fix the "Clear Reference" button, which was not working due to the refbrowser_removeReference function hidden in a anonymous function.