Beginnings of code cleanup.