Make examples compilable

And there are a lot of outdated documentation in `doc/` maybe we should just delete it.