Work toward js peer implementation. WIP.