Add a lot of optimization, loading dialogs etc.
Merge