[refactor] Moved common state stuff to a common base state