Move StateFactory creation to static field