Before rewriting entity system