Made header more concise
Fixed HTML escaping
Removed client variable stuff, added flag info
Write to plain text instead of HTML
Tabs to spaces