Just from quickly looking at it, if you haven't already found it out by now.
Your error appears to be where you stated (The very last line of the spy script):
Code:
wait; alias Switch switch+ wait; wait; wait; wait; wait; wait" alias Switch "Switch+"
I don't understand what those extra waits are for before you call alias switch "switch+" again. Didn't you already state that before all the waits?
Also, I believe switch+ in that line should have quotation marks around it. Note the part that I bolded - I'm not sure if its needed, but it seems that you forgot the semicolon to seperate each statement.