Added the state seletor and the added the update contact functions.