Some more final fixes so that doctester works in real life environments.