Fixed API to be structured