Removes extra js variables
Adds currentSwitch var