Fine tune the API to work both as objects and through promises