massive network changes / rewrote some stuff for the new api