Refactor api_tests.
Move apitests away from thesaurus