Notes on API design