Added additional input fields and data saving and retrieval.