Modify state management to use abstract states and data inheiritance.