Extract API stuff into NotesBackend service