Sanitize flags.
Simplify the way demo loads JSON.
Fix the log for fragment handling.