     }
     
     /**
-     *  @private
+     *  Method is responsible for create the persistence manager for the application.
+     *  This method will automatically be called when the persistence manager is
+     *  accessed for the first time or if the <code>sessionCachingEnabled</code> flag
+     *  is set to true on the application.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
      */
-    // FIXME (chiedozi): Maybe use a singleton for persistence, PARB (GLENN)
     protected function createPersistenceManager():IPersistenceManager
     {
         return new PersistenceManager();
     }
     
     /**
+     *  Responsible for persisting the application state to the persistence manager.
+     *  This method is automatically called when <code>sessionCachingEnabled</code>
+     *  is set to true.  By default, this method will save the application version 
+     *  and the time the persistence object was created to the "timestamp" and 
+     *  "applicationVersion" keys.
+     * 
+     *  <p>This method will only be called if the <code>FlexEvent.APPLICATION_PERSISTING<code>
+     *  event is not canceled.</p>
+     * 
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
+     */ 
+    protected function persistApplicationState():void
+    {
+        // Save version number of application
+        var appDescriptor:XML = NativeApplication.nativeApplication.applicationDescriptor;
+        var ns:Namespace = appDescriptor.namespace();
+        
+        // TODO (chiedozi): See if reserving these keys is bad
+        persistenceManager.setProperty("timestamp", new Date().getTime());
+        persistenceManager.setProperty("applicationVersion", 
+                                        appDescriptor.ns::versionNumber.toString());
+    }
+    
+    /**
+     *  Method is responsible for registering the class types that may be
+     *  saved to a persistence manager that uses a shared object as its data store.  
+     *  Since shared objects use the standard AMF encoding rules, custom class types
+     *  must be registered with the runtime so that they are properly read in.  This 
+     *  method is called before the persistence manager is initialized so that the 
+     *  application has a chance to use <code>flash.net.registerClassAlias()</code> 
+     *  before the persistence data is loaded.
+     * 
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
+     */ 
+    protected function registerPersistenceClassAliases():void
+    {
+    }
+    
+    /**
+     *  Responsible for restoring the application's state when the
+     *  <code>sessionCachingEnabled</code> flag is set to true.
+     * 
+     *  <p>This method will only be called if the <code>FlexEvent.APPLICATION_RESTORING<code>
+     *  event is not canceled.</p>
+     * 
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
+     */ 
+    protected function restoreApplicationState():void
+    {
+    }
+    
+    //--------------------------------------------------------------------------
+    //
+    //  Private Methods
+    //
+    //--------------------------------------------------------------------------
+    
+    /**
+     *  @private
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
+     */ 
+    private function addApplicationListeners():void
+    {
+        // Add device event listeners
+        systemManager.stage.addEventListener(KeyboardEvent.KEY_DOWN, deviceKeyDownHandler);
+        systemManager.stage.addEventListener(KeyboardEvent.KEY_UP, deviceKeyUpHandler);
+        systemManager.stage.addEventListener(StageOrientationEvent.ORIENTATION_CHANGE, 
+            orientationChangeHandler);
+        NativeApplication.nativeApplication.
+            addEventListener(InvokeEvent.INVOKE, nativeApplication_invokeHandler);
+        
+        // We need to listen to different events on desktop and mobile because
+        // on desktop, the deactivate event is dispatched whenever the window loses
+        // focus.  This could cause persistence to run when the developer doesn't
+        // expect it to on desktop.
+        var os:String = Capabilities.os;
+        
+        if (os.indexOf("Windows") != -1 || os.indexOf("Mac OS") != -1)
+            NativeApplication.nativeApplication.
+                addEventListener(Event.EXITING, nativeApplication_deactivateHandler);
+        else
+            NativeApplication.nativeApplication.
+                addEventListener(Event.DEACTIVATE, nativeApplication_deactivateHandler);
+    }
+    
+    /**
+     *  @private
+     */ 
+    private function deviceKeyDownHandler(event:KeyboardEvent):void
+    {
+        var key:uint = event.keyCode;
+        
+        // We want to prevent the default down behavior for back key if 
+        // the navigator has a view to pop back to
+        if (key == Keyboard.BACK)
+        {
+            backKeyEventPreventDefaulted = event.isDefaultPrevented();
+            
+            if (!exitApplicationOnBackKey)
+                event.preventDefault();
+        }
+        else if (key == Keyboard.MENU)
+        {
+            menuKeyEventPreventDefaulted = event.isDefaultPrevented();
+            
+            if (menuKeyEventPreventDefaulted)
+                event.preventDefault();
+        }
+        
+    }
+    
+    /**
+     *  @private
+     */ 
+    private function deviceKeyUpHandler(event:KeyboardEvent):void
+    {
+        var key:uint = event.keyCode;
+
+        // If preventDefault() wasn't called on the initial keyDown event
+        // and the application thinks it can cancel the native back behavior,
+        // call the backKeyHandler() method.  Otherwise, the runtime will
+        // handle the back key function.
+        
+        // The backKeyEventPreventDefaulted key is always set in the
+        // deviceKeyDownHandler method and so doesn't need to be reset.
+        if (key == Keyboard.BACK && !backKeyEventPreventDefaulted && !exitApplicationOnBackKey)
+            backKeyHandler();
+        else if (key == Keyboard.MENU && !menuKeyEventPreventDefaulted)
+            menuKeyHandler(event);
+    }
+    
+    
+    /**
+     *  @private
      * 
      *  @langversion 3.0
      *  @playerversion Flash 10

    }
    
    /**
     * 
     *  @langversion 3.0
     *  @playerversion Flash 10
     *  @playerversion AIR 2.5

    //  Constructor
    //
    //--------------------------------------------------------------------------
    
    /**
     *  Constructor
     * 
     *  @langversion 3.0
     *  @playerversion Flash 10.1
     *  @playerversion AIR 2.5
     *  @productversion Flex 4.5
     */ 
    public function MobileApplicationBase()
    {
