Beginnings of refactor