Changed to running loop so ExitCommand doesn't need access to the Environment - cleaned up duplicate App.cs file