entitymap now stores ints as values, transform stores array of rather than using malloc()/free()