Moved out-of-place state declarations to the proper phase (setup, not run).