Refactoring: unit -> entity. Momentary fix of enum bug in distribution