change get_query_url and load_url to use encodeURI and decodeURI; fix and/or deal with all downstream consequences