Refactore, make compatible with DCG 2

Refactore the Entity base class, use an interface instead now.
Make compatible with the new DC_General 2 API.