Promise compatible API & initial tests.