Rebuild app with proper handling
Added saving app state