Corrected models and initial version of the api client