Added SingleInstanceMonitor release before app restart.
Small refactoring.