Various security improvements.