Added some fields to the models, implemented more of the api