Api updates and more unit tests.