some misc. code cleanup.