JavaScript optimizer