fixed critical compile error in model, and created constructor in api client.