Extracted all code that will be common with l0. Compared with ref mans for l0 and l4. No functional change, just moving things getting ready.