removes dozens of var statements in favor of commas, generally cleans up
adds missing bracket
fixes variable declaration
fixes bracket
adds uri encoding, fingers crossed