Update MainApplication.class.php