Interlude 1 - refactor.
Interlude 1 + some fixes.