Fixed some query string handling.
XML syntax tweaking, first phase.