Added Smart pointer/array class and applied it to the model class.