Changed logging for tests
Finished api tests
Added query ability to api