Moved definitions of state structs and capitalized #defines