BUGFIX - fix non-linear reference to state (RealWorld) in michael scott.  Also add a type signature.