Api changes

Closes #7 

@rcrichton if you could please review?