Finally figured how to use local storage with arrays. Changed markup and CSS. Added check for duplicates, all the fields are editable now