Performance tweaks, create state history component