Add basic state and context structure