PhantomController no longer calls MainApp to minimise.
Instead of setting refrence to MainApp, refrence to primaryStage is given.