MatchableEntity extension and refactoring