Consolidated ngstate.py into gstate.py