Basic api and tests