input: Refactoring API. Move tests to proper files - WIP.