Improved exception safety
Cleanup