mostly code cleanup.