Various changes to support the removed old code.