Clean up, exception safety in a few spots.