#386 Nonworking intermediate commit - Renamed EntityId to Entity and Entity to EntityRevision to make their roles more clear + some related changes like cascaded deletion