Changed id type to model, added some operations