remove redundant js variables