Added some essential methods to models.