Cleanup and sanitize.