Added begin of generateStates() and added int extractInt(std::string)