Fix indent
Remove trailing white space
Assign nil to `$app` when restarting app