Cleaned up logic for generating states
Dealt with case where default graph is present, but not alternatives are defined.