circuit simulation cleanup