Better structure of the api