Realization of the main function

Including the user dialog and different necessary changes in the
classes.
Problem with empty XML files have to be solved in the future.