Added debug mode - activated by ?debug in querystring.