Adding methods for serializing the model.  If we support php 5.4, we should implement JsonSerializable