split state stuff out into separate project