Change API to use more node-like callback style.