Migration to the planned internal design, breaking legacy and new glue code added. Unneeded code removed, other minor fixes.