JavaScript library cleanup