Add save function in which users can save their input into XML
Some bug fixed