Tentative refactor (WIP).