It will eventually rewritten. This commit prepares some clean space to start this process. So far no functional changes.