Moving entity factory to extension