Changed input to use react patterns