cleanup of branch
added tor shutdown options, minor cleanups