Added dynamic memory allocation.
Added persistent store for state of yactimermodel.