Partial revert of 36adf15 (lib code is not yet ready).