Added basic state management headers
implemented engine
More base state work