Added get-app-main-window function.
Bug-fix for .NET 4.5, ICommand got moved, everything broken.