Added basic state functionality