script and doc cleanup