Designing Better JavaScript APIs