urlencoding improvements