Removed cruft and add query string logging.