Fixed URLEncode to some extent: A-F, 0-9, % and ^ are not replaced due to double replacement errors. Added debugon and debug off commands to see what the program is running