some security work and doc cleanup