Mostly code cleanup.