Moved JS into module. Progress in the direction of connecting two peers.