Sort history values by response's referer.
Add potential output formats.
Refactor output formats of history.