Added a function called refresh that can be used to update the options and selected option if the select element has changed.