Overhaul on stateIDs and stateTypes to simplify use