Restructure state object handling