Misc. code cleanup.