yet another big diff. fixed hash encoding bugs, started implementing peer conns.