Commencement of some code cleanup