Added MonadReader and MonadState instances.