Started working on LGSparseArray. Fixed bug in EntityFromTemplate.