remove redundant javascript