Check whether app has initiated or already running. If already running, restore the variable states, else, initialize them with default values.