Continue API implementation, refactoring and adding more unit tests.