Updating api, passing more tests.