Beginnings of systems abstraction. Refactor.