move entity system into core