Entity inheritance

Separate branch with tests as you ask