Refactor main (extract method getStateMap)