Created lib/index.js to reflect the API.