Added model of self, and fixed a bug in the model.