simplify tor; add chat; various fixes and refacs