Moved state stuff into its own folder