Made Entity manage its own memory.