make testing api sane, add documentation