Main functions in StateMap, but still in work, just commit for testing
purposes for the viewprogger