Add saving to the xml-file

Also, added the layout of the class adding  for small displays. And the
code is refactored.
Revert "Add saving to the xml-file"

This reverts commit b142020bca7c1376f471106a2be2412fb7c1e7a4.
Revert "Revert "Add saving to the xml-file""

This reverts commit 85f9fba8e951809ee7b52c503d5320a1d3705b2e.