To keep things forward compatible, it might be good to change this to 

    everything (++) (mkQ [] variablesOf)
    where
      variablesOf (JSVar var) = [var]
      variablesOf _ = []