Refactor entity vars