Refactored app restart and fixed tutorial bug