Cleaned up state copying once again.