some minor cleanup, but the lead action seems to be corrupting memory. needs more investigation.