refactor main window when application strait
add parser for read and write xml.