Added API model, distinct from Model. Added AppState save/restore functionalities in AppState manager